home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1996-09-16 | 13.0 KB | [TEXT/ttxt] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Mon Sep 16 15:26:46 1996, modified Mon Sep 16 15:26:46 1996, creator SimpleText, type ASCII, 12747 bytes "!ReadMe" , at 0x324b 332 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [ttxt] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 07 21 52 65 61 64 4d | 65 00 00 00 00 00 00 00 |..!ReadM|e.......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 74 74 78 | 74 01 00 00 00 00 00 00 |.TEXTttx|t.......|
|00000050| 00 00 00 00 00 31 cb 00 | 00 01 4c ae 63 5a 76 ae |.....1..|..L.cZv.|
|00000060| 63 5a 76 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |cZv.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 c7 14 00 00 |........|........|
|00000080| 54 77 69 73 74 20 44 6f | 77 6e 20 4c 69 73 74 73 |Twist Do|wn Lists|
|00000090| 20 52 65 61 64 20 4d 65 | 0d 41 75 74 68 6f 72 3a | Read Me|.Author:|
|000000a0| 20 43 6f 6e 72 61 64 20 | 4b 6f 70 61 6c 61 0d 0d | Conrad |Kopala..|
|000000b0| 43 6f 6d 70 69 6c 65 20 | 4e 6f 74 65 73 3a 0d 0d |Compile |Notes:..|
|000000c0| 54 77 69 73 74 20 44 6f | 77 6e 20 4c 69 73 74 73 |Twist Do|wn Lists|
|000000d0| 20 68 61 73 20 62 65 65 | 6e 20 63 6f 6d 70 69 6c | has bee|n compil|
|000000e0| 65 64 20 66 6f 72 20 74 | 68 65 20 63 61 73 65 73 |ed for t|he cases|
|000000f0| 20 6c 69 73 74 65 64 20 | 62 65 6c 6f 77 3a 0d 0d | listed |below:..|
|00000100| 50 50 43 20 64 65 62 75 | 67 0d 4d 41 42 75 69 6c |PPC debu|g.MABuil|
|00000110| 64 20 22 54 77 69 73 74 | 20 44 6f 77 6e 20 4c 69 |d "Twist| Down Li|
|00000120| 73 74 73 22 20 2d 63 70 | 20 4d 72 43 20 2d 4d 72 |sts" -cp| MrC -Mr|
|00000130| 43 20 22 2d 6f 70 74 20 | 6f 66 66 22 20 2d 64 65 |C "-opt |off" -de|
|00000140| 62 75 67 20 2d 6e 61 6d | 65 73 20 2d 6d 6f 64 65 |bug -nam|es -mode|
|00000150| 6c 66 61 72 20 2d 61 75 | 74 6f 62 75 69 6c 64 0d |lfar -au|tobuild.|
|00000160| 0d 50 50 43 20 6e 6f 64 | 65 62 75 67 0d 4d 41 42 |.PPC nod|ebug.MAB|
|00000170| 75 69 6c 64 20 22 54 77 | 69 73 74 20 44 6f 77 6e |uild "Tw|ist Down|
|00000180| 20 4c 69 73 74 73 22 20 | 2d 63 70 20 4d 72 43 20 | Lists" |-cp MrC |
|00000190| 2d 6e 61 6d 65 73 20 2d | 6d 6f 64 65 6c 66 61 72 |-names -|modelfar|
|000001a0| 20 2d 61 75 74 6f 62 75 | 69 6c 64 0d 0d 36 38 4b | -autobu|ild..68K|
|000001b0| 20 64 65 62 75 67 0d 4d | 41 42 75 69 6c 64 20 22 | debug.M|ABuild "|
|000001c0| 54 77 69 73 74 20 44 6f | 77 6e 20 4c 69 73 74 73 |Twist Do|wn Lists|
|000001d0| 22 20 2d 63 6c 61 73 73 | 69 63 20 2d 64 65 62 75 |" -class|ic -debu|
|000001e0| 67 20 2d 6e 61 6d 65 73 | 20 2d 73 79 6d 20 2d 6d |g -names| -sym -m|
|000001f0| 6f 64 65 6c 46 61 72 20 | 2d 6e 6f 4d 41 4c 69 62 |odelFar |-noMALib|
|00000200| 72 61 72 79 20 2d 61 75 | 74 6f 62 75 69 6c 64 0d |rary -au|tobuild.|
|00000210| 0d 36 38 4b 20 6e 6f 64 | 65 62 75 67 0d 4d 41 42 |.68K nod|ebug.MAB|
|00000220| 75 69 6c 64 20 22 54 77 | 69 73 74 20 44 6f 77 6e |uild "Tw|ist Down|
|00000230| 20 4c 69 73 74 73 22 20 | 2d 63 6c 61 73 73 69 63 | Lists" |-classic|
|00000240| 20 2d 6e 61 6d 65 73 20 | 2d 6d 6f 64 65 6c 46 61 | -names |-modelFa|
|00000250| 72 20 2d 6e 6f 4d 41 4c | 69 62 72 61 72 79 20 2d |r -noMAL|ibrary -|
|00000260| 61 75 74 6f 62 75 69 6c | 64 0d 0d 41 6c 6c 20 63 |autobuil|d..All c|
|00000270| 6f 6d 70 69 6c 65 73 20 | 77 65 72 65 20 64 6f 6e |ompiles |were don|
|00000280| 65 20 6f 6e 20 61 20 50 | 6f 77 65 72 20 4d 61 63 |e on a P|ower Mac|
|00000290| 20 37 35 30 30 2f 31 30 | 30 20 77 69 74 68 20 38 | 7500/10|0 with 8|
|000002a0| 30 20 6d 62 20 6f 66 20 | 6d 65 6d 6f 72 79 2e 0d |0 mb of |memory..|
|000002b0| 41 6c 6c 20 63 6f 6d 70 | 69 6c 65 73 20 77 65 72 |All comp|iles wer|
|000002c0| 65 20 64 6f 6e 65 20 75 | 73 69 6e 67 20 45 54 4f |e done u|sing ETO|
|000002d0| 32 30 20 4d 61 63 41 70 | 70 20 33 2e 33 2e 31 2c |20 MacAp|p 3.3.1,|
|000002e0| 20 4d 50 57 20 33 2e 34 | 2e 31 2e 0d 0d 42 6f 74 | MPW 3.4|.1...Bot|
|000002f0| 68 20 64 65 62 75 67 20 | 61 6e 64 20 6e 6f 64 65 |h debug |and node|
|00000300| 62 75 67 20 63 6f 6d 70 | 69 6c 65 73 20 6d 75 73 |bug comp|iles mus|
|00000310| 74 20 62 65 20 64 6f 6e | 65 20 75 73 69 6e 67 20 |t be don|e using |
|00000320| 74 68 65 20 6d 6f 64 69 | 66 69 65 64 20 66 69 6c |the modi|fied fil|
|00000330| 65 73 3a 0d 0d 55 50 6c | 61 74 66 6f 72 6d 4d 65 |es:..UPl|atformMe|
|00000340| 6d 6f 72 79 2e 68 0d 55 | 50 6c 61 74 66 6f 72 6d |mory.h.U|Platform|
|00000350| 4d 65 6d 6f 72 79 2e 63 | 70 0d 0d 49 6e 20 6f 72 |Memory.c|p..In or|
|00000360| 64 65 72 20 74 6f 20 64 | 6f 20 61 20 64 65 62 75 |der to d|o a debu|
|00000370| 67 20 63 6f 6d 70 69 6c | 65 20 79 6f 75 20 6d 75 |g compil|e you mu|
|00000380| 73 74 20 61 6c 73 6f 20 | 75 73 65 20 74 68 65 20 |st also |use the |
|00000390| 73 75 62 73 74 69 74 75 | 74 65 20 66 69 6c 65 73 |substitu|te files|
|000003a0| 20 66 6f 72 0d 0d 55 4f | 62 6a 65 63 74 2e 68 0d | for..UO|bject.h.|
|000003b0| 55 4f 62 6a 65 63 74 2e | 63 70 2e 0d 0d 0d 54 65 |UObject.|cp....Te|
|000003c0| 73 74 69 6e 67 3a 0d 0d | 54 68 65 20 6d 6f 73 74 |sting:..|The most|
|000003d0| 20 65 78 74 65 6e 73 69 | 76 65 20 74 65 73 74 69 | extensi|ve testi|
|000003e0| 6e 67 20 77 61 73 20 64 | 6f 6e 65 20 6f 6e 20 74 |ng was d|one on t|
|000003f0| 68 65 20 50 6f 77 65 72 | 20 4d 61 63 2e 20 0d 0d |he Power| Mac. ..|
|00000400| 4c 65 73 73 20 65 78 74 | 65 6e 73 69 76 65 20 36 |Less ext|ensive 6|
|00000410| 38 4b 20 74 65 73 74 69 | 6e 67 20 77 61 73 20 64 |8K testi|ng was d|
|00000420| 6f 6e 65 20 6f 6e 20 61 | 20 4d 61 63 69 6e 74 6f |one on a| Macinto|
|00000430| 73 68 20 49 49 63 69 2e | 0d 0d 41 6c 6c 20 74 65 |sh IIci.|..All te|
|00000440| 73 74 69 6e 67 20 77 61 | 73 20 64 6f 6e 65 20 75 |sting wa|s done u|
|00000450| 6e 64 65 72 20 53 79 73 | 74 65 6d 20 37 2e 35 2e |nder Sys|tem 7.5.|
|00000460| 33 20 75 70 64 61 74 65 | 20 32 2e 0d 0d 0d 50 61 |3 update| 2....Pa|
|00000470| 72 74 69 74 69 6f 6e 20 | 53 69 7a 65 3a 0d 72 65 |rtition |Size:.re|
|00000480| 77 72 69 74 65 20 74 68 | 69 73 20 6e 6f 74 65 0d |write th|is note.|
|00000490| 54 68 65 20 54 77 69 73 | 74 20 44 6f 77 6e 20 4c |The Twis|t Down L|
|000004a0| 69 73 74 73 20 53 49 5a | 45 20 72 65 73 6f 75 72 |ists SIZ|E resour|
|000004b0| 63 65 20 73 65 74 73 20 | 74 68 65 20 70 61 72 74 |ce sets |the part|
|000004c0| 69 74 69 6f 6e 20 73 69 | 7a 65 20 73 75 63 68 20 |ition si|ze such |
|000004d0| 74 68 61 74 20 74 68 65 | 20 61 70 70 6c 69 63 61 |that the| applica|
|000004e0| 74 69 6f 6e 20 6a 75 73 | 74 20 72 75 6e 73 20 6f |tion jus|t runs o|
|000004f0| 75 74 20 6f 66 20 6d 65 | 6d 6f 72 79 20 0d 0d 61 |ut of me|mory ..a|
|00000500| 2e 20 77 68 65 6e 20 61 | 6c 74 65 72 6e 61 74 69 |. when a|lternati|
|00000510| 6e 67 20 6f 70 65 6e 20 | 61 6e 64 20 65 78 70 61 |ng open |and expa|
|00000520| 6e 64 20 61 6c 6c 20 63 | 6f 6d 6d 61 6e 64 73 20 |nd all c|ommands |
|00000530| 61 74 74 65 6d 70 74 69 | 6e 67 20 74 6f 20 6f 70 |attempti|ng to op|
|00000540| 65 6e 20 74 68 65 20 6c | 61 73 74 20 31 30 30 4d |en the l|ast 100M|
|00000550| 62 20 64 69 73 6b 20 70 | 61 72 74 69 74 69 6f 6e |b disk p|artition|
|00000560| 20 6f 6e 20 6d 79 20 31 | 47 62 20 64 69 73 6b 20 | on my 1|Gb disk |
|00000570| 72 65 73 75 6c 74 73 20 | 69 6e 20 74 68 65 20 6f |results |in the o|
|00000580| 75 74 20 6f 66 20 6d 65 | 6d 6f 72 79 20 66 61 69 |ut of me|mory fai|
|00000590| 6c 75 72 65 0d 0d 62 2e | 20 77 68 65 6e 20 66 69 |lure..b.| when fi|
|000005a0| 72 73 74 20 6f 70 65 6e | 69 6e 67 20 61 6c 6c 20 |rst open|ing all |
|000005b0| 64 69 73 6b 20 70 61 72 | 74 69 74 69 6f 6e 73 20 |disk par|titions |
|000005c0| 61 6e 64 20 74 68 65 6e | 20 61 74 74 65 6d 70 74 |and then| attempt|
|000005d0| 69 6e 67 20 74 6f 20 64 | 6f 20 74 68 65 20 65 78 |ing to d|o the ex|
|000005e0| 70 61 6e 64 20 61 6c 6c | 20 63 6f 6d 6d 61 6e 64 |pand all| command|
|000005f0| 20 6f 6e 20 65 61 63 68 | 20 6f 66 20 74 68 65 6d | on each| of them|
|00000600| 2c 20 77 69 6c 6c 20 72 | 65 73 75 6c 74 20 74 69 |, will r|esult ti|
|00000610| 6e 20 74 68 65 20 6f 75 | 74 20 6f 66 20 6d 65 6d |n the ou|t of mem|
|00000620| 6f 72 79 20 66 61 69 6c | 75 72 65 2e 0d 0d 0d 50 |ory fail|ure....P|
|00000630| 72 6f 62 6c 65 6d 73 3a | 0d 0d 53 65 76 65 72 61 |roblems:|..Severa|
|00000640| 6c 20 4d 61 63 41 70 70 | 20 72 65 6c 61 74 65 64 |l MacApp| related|
|00000650| 20 70 72 6f 62 6c 65 6d | 73 20 77 65 72 65 20 65 | problem|s were e|
|00000660| 6e 63 6f 75 6e 74 65 72 | 65 64 2e 20 54 68 65 79 |ncounter|ed. They|
|00000670| 20 61 72 65 20 64 65 73 | 63 72 69 62 65 64 20 69 | are des|cribed i|
|00000680| 6e 20 64 65 74 61 69 6c | 20 68 65 72 65 2e 0d 0d |n detail| here...|
|00000690| 31 2e 20 54 41 70 70 6c | 69 63 61 74 69 6f 6e 3a |1. TAppl|ication:|
|000006a0| 3a 47 65 74 43 6f 6e 74 | 61 69 6e 65 64 4f 62 6a |:GetCont|ainedObj|
|000006b0| 65 63 74 0d 0d 57 68 65 | 6e 20 74 65 73 74 69 6e |ect..Whe|n testin|
|000006c0| 67 20 61 6e 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |g an app|lication|
|000006d0| 2c 20 79 6f 75 20 73 68 | 6f 75 6c 64 20 64 65 6c |, you sh|ould del|
|000006e0| 69 62 65 72 61 74 65 6c | 79 20 61 74 74 65 6d 70 |iberatel|y attemp|
|000006f0| 74 20 74 6f 20 62 72 65 | 61 6b 20 69 74 2e 20 4f |t to bre|ak it. O|
|00000700| 6e 65 20 77 61 79 20 6f | 66 20 61 63 63 6f 6d 70 |ne way o|f accomp|
|00000710| 6c 69 73 68 69 6e 67 20 | 74 68 61 74 20 69 73 20 |lishing |that is |
|00000720| 74 6f 20 61 73 6b 20 74 | 68 65 20 61 70 70 6c 69 |to ask t|he appli|
|00000730| 63 61 74 69 6f 6e 20 74 | 6f 20 64 6f 20 64 75 6d |cation t|o do dum|
|00000740| 62 20 74 68 69 6e 67 73 | 20 74 68 61 74 20 6e 6f |b things| that no|
|00000750| 20 73 61 6e 65 20 70 65 | 72 73 6f 6e 20 77 6f 75 | sane pe|rson wou|
|00000760| 6c 64 20 61 73 6b 20 69 | 74 20 74 6f 20 64 6f 2e |ld ask i|t to do.|
|00000770| 20 4d 79 20 61 74 74 69 | 74 75 64 65 20 69 73 2c | My atti|tude is,|
|00000780| 20 69 66 20 49 20 63 61 | 6e 20 74 68 69 6e 6b 20 | if I ca|n think |
|00000790| 74 6f 20 64 6f 20 69 74 | 2c 20 74 68 65 72 65 20 |to do it|, there |
|000007a0| 73 75 72 65 6c 79 20 69 | 73 20 61 74 20 6c 65 61 |surely i|s at lea|
|000007b0| 73 74 20 6f 6e 65 20 6f | 74 68 65 72 20 70 65 72 |st one o|ther per|
|000007c0| 73 6f 6e 20 77 68 6f 20 | 77 69 6c 6c 20 61 6c 73 |son who |will als|
|000007d0| 6f 20 64 6f 20 69 74 2e | 0d 0d 49 6e 20 74 68 69 |o do it.|..In thi|
|000007e0| 73 20 63 61 73 65 2c 20 | 74 68 65 20 64 75 6d 62 |s case, |the dumb|
|000007f0| 20 74 68 69 6e 67 20 74 | 6f 20 64 6f 20 69 73 20 | thing t|o do is |
|00000800| 6d 61 6b 65 20 61 20 73 | 63 72 69 70 74 20 61 73 |make a s|cript as|
|00000810| 6b 20 74 68 65 20 61 70 | 70 6c 69 63 61 74 69 6f |k the ap|plicatio|
|00000820| 6e 20 74 6f 20 61 63 63 | 65 73 73 20 61 20 64 6f |n to acc|ess a do|
|00000830| 63 75 6d 65 6e 74 20 77 | 68 65 6e 20 74 68 65 72 |cument w|hen ther|
|00000840| 65 20 61 72 65 20 6e 6f | 20 6f 70 65 6e 20 64 6f |e are no| open do|
|00000850| 63 75 6d 65 6e 74 73 2e | 20 54 68 65 20 72 65 73 |cuments.| The res|
|00000860| 75 6c 74 20 69 73 20 61 | 20 66 61 74 61 6c 20 61 |ult is a| fatal a|
|00000870| 63 63 65 73 73 20 65 72 | 72 6f 72 2e 0d 0d 54 68 |ccess er|ror...Th|
|00000880| 65 20 64 69 66 66 69 63 | 75 6c 74 79 20 61 72 69 |e diffic|ulty ari|
|00000890| 73 65 73 20 66 72 6f 6d | 20 74 68 65 20 66 6f 6c |ses from| the fol|
|000008a0| 6c 6f 77 69 6e 67 20 63 | 6f 64 65 20 73 6e 69 70 |lowing c|ode snip|
|000008b0| 70 65 74 20 66 72 6f 6d | 20 54 41 70 70 6c 69 63 |pet from| TApplic|
|000008c0| 61 74 69 6f 6e 3a 3a 47 | 65 74 43 6f 6e 74 61 69 |ation::G|etContai|
|000008d0| 6e 65 64 4f 62 6a 65 63 | 74 0d 0d 09 65 6c 73 65 |nedObjec|t...else|
|000008e0| 20 69 66 20 28 64 65 73 | 69 72 65 64 54 79 70 65 | if (des|iredType|
|000008f0| 20 3d 3d 20 63 44 6f 63 | 75 6d 65 6e 74 20 26 26 | == cDoc|ument &&|
|00000900| 20 73 65 6c 65 63 74 69 | 6f 6e 46 6f 72 6d 20 3d | selecti|onForm =|
|00000910| 3d 20 66 6f 72 6d 4e 61 | 6d 65 29 0d 09 7b 0d 09 |= formNa|me)..{..|
|00000920| 09 2f 2f 20 57 65 20 6b | 6e 6f 77 20 77 65 27 72 |.// We k|now we'r|
|00000930| 65 20 67 6f 69 6e 67 20 | 61 66 74 65 72 20 61 20 |e going |after a |
|00000940| 64 6f 63 75 6d 65 6e 74 | 20 77 69 74 68 20 61 20 |document| with a |
|00000950| 0d 09 09 2f 2f 20 73 70 | 65 63 69 66 69 63 20 6e |...// sp|ecific n|
|00000960| 61 6d 65 20 73 6f 20 6a | 75 73 74 20 73 63 61 6e |ame so j|ust scan|
|00000970| 20 74 68 65 20 64 6f 63 | 75 6d 65 6e 74 20 6c 69 | the doc|ument li|
|00000980| 73 74 2e 0d 09 09 43 53 | 74 72 32 35 35 20 20 74 |st....CS|tr255 t|
|00000990| 68 65 44 6f 63 4e 61 6d | 65 3b 0d 09 09 43 4e 6f |heDocNam|e;...CNo|
|000009a0| 47 68 6f 73 74 44 6f 63 | 73 49 74 65 72 61 74 6f |GhostDoc|sIterato|
|000009b0| 72 20 20 69 74 65 72 28 | 74 68 69 73 29 3b 0d 09 |r iter(|this);..|
|000009c0| 09 54 44 6f 63 75 6d 65 | 6e 74 2a 20 20 61 44 6f |.TDocume|nt* aDo|
|000009d0| 63 75 6d 65 6e 74 20 3d | 20 69 74 65 72 2e 46 69 |cument =| iter.Fi|
|000009e0| 72 73 74 44 6f 63 75 6d | 65 6e 74 28 29 3b 0d 09 |rstDocum|ent();..|
|000009f0| 09 0d 09 09 73 65 6c 65 | 63 74 69 6f 6e 44 61 74 |....sele|ctionDat|
|00000a00| 61 2e 47 65 74 53 74 72 | 69 6e 67 28 74 68 65 44 |a.GetStr|ing(theD|
|00000a10| 6f 63 4e 61 6d 65 29 3b | 0d 09 09 64 6f 0d 09 09 |ocName);|...do...|
|00000a20| 7b 0d 09 09 20 20 69 66 | 20 28 28 61 44 6f 63 75 |{... if| ((aDocu|
|00000a30| 6d 65 6e 74 2d 3e 47 65 | 74 4f 4d 43 6c 61 73 73 |ment->Ge|tOMClass|
|00000a40| 28 29 20 3d 3d 20 64 65 | 73 69 72 65 64 54 79 70 |() == de|siredTyp|
|00000a50| 65 29 20 0d 09 09 09 09 | 09 09 09 09 26 26 20 28 |e) .....|....&& (|
|00000a60| 61 44 6f 63 75 6d 65 6e | 74 2d 3e 66 54 69 74 6c |aDocumen|t->fTitl|
|00000a70| 65 20 3d 3d 20 74 68 65 | 44 6f 63 4e 61 6d 65 29 |e == the|DocName)|
|00000a80| 29 0d 09 09 20 20 20 20 | 72 65 73 75 6c 74 20 3d |)... |result =|
|00000a90| 20 61 44 6f 63 75 6d 65 | 6e 74 3b 0d 09 09 20 20 | aDocume|nt;... |
|00000aa0| 61 44 6f 63 75 6d 65 6e | 74 20 3d 20 69 74 65 72 |aDocumen|t = iter|
|00000ab0| 2e 4e 65 78 74 44 6f 63 | 75 6d 65 6e 74 28 29 3b |.NextDoc|ument();|
|00000ac0| 0d 09 09 7d 20 77 68 69 | 6c 65 20 28 72 65 73 75 |...} whi|le (resu|
|00000ad0| 6c 74 20 3d 3d 20 4e 55 | 4c 4c 20 26 26 20 69 74 |lt == NU|LL && it|
|00000ae0| 65 72 2e 4d 6f 72 65 28 | 29 29 3b 0d 09 7d 0d 0d |er.More(|));..}..|
|00000af0| 0d 41 73 20 63 61 6e 20 | 62 65 20 73 65 65 6e 2c |.As can |be seen,|
|00000b00| 20 69 74 20 61 73 73 75 | 6d 65 73 20 74 68 61 74 | it assu|mes that|
|00000b10| 20 74 68 65 72 65 20 69 | 73 20 61 74 20 6c 65 61 | there i|s at lea|
|00000b20| 73 74 20 6f 6e 65 20 64 | 6f 63 75 6d 65 6e 74 20 |st one d|ocument |
|00000b30| 61 6e 64 20 77 68 65 6e | 20 69 74 20 61 73 6b 73 |and when| it asks|
|00000b40| 20 74 68 65 20 6e 6f 6e | 2d 65 78 69 73 74 65 6e | the non|-existen|
|00000b50| 74 20 64 6f 63 75 6d 65 | 6e 74 20 74 6f 20 47 65 |t docume|nt to Ge|
|00000b60| 74 4f 4d 43 6c 61 73 73 | 28 29 2c 20 61 6e 20 61 |tOMClass|(), an a|
|00000b70| 63 63 65 73 73 20 65 72 | 72 6f 72 20 72 65 73 75 |ccess er|ror resu|
|00000b80| 6c 74 73 2e 0d 0d 54 68 | 69 73 20 70 72 6f 62 6c |lts...Th|is probl|
|00000b90| 65 6d 20 77 61 73 20 73 | 6f 6c 76 65 64 20 69 6e |em was s|olved in|
|00000ba0| 20 54 77 69 73 74 20 44 | 6f 77 6e 20 4c 69 73 74 | Twist D|own List|
|00000bb0| 73 20 77 69 74 68 20 74 | 68 65 20 66 6f 6c 6c 6f |s with t|he follo|
|00000bc0| 77 69 6e 67 20 63 6f 64 | 65 20 73 6e 69 70 70 65 |wing cod|e snippe|
|00000bd0| 74 20 69 6e 20 54 54 77 | 69 73 74 44 6f 77 6e 4c |t in TTw|istDownL|
|00000be0| 69 73 74 73 3a 3a 47 65 | 74 43 6f 6e 74 61 69 6e |ists::Ge|tContain|
|00000bf0| 65 64 4f 62 6a 65 63 74 | 0d 0d 09 65 6c 73 65 20 |edObject|...else |
|00000c00| 69 66 20 28 64 65 73 69 | 72 65 64 54 79 70 65 20 |if (desi|redType |
|00000c10| 3d 3d 20 63 44 6f 63 75 | 6d 65 6e 74 20 26 26 20 |== cDocu|ment && |
|00000c20| 73 65 6c 65 63 74 69 6f | 6e 46 6f 72 6d 20 3d 3d |selectio|nForm ==|
|00000c30| 20 66 6f 72 6d 4e 61 6d | 65 29 0d 09 7b 0d 2f 2f | formNam|e)..{.//|
|00000c40| 4e 6f 74 65 3a 20 4d 61 | 63 41 70 70 20 33 2e 33 |Note: Ma|cApp 3.3|
|00000c50| 2e 31 20 54 41 70 70 6c | 69 63 61 74 69 6f 6e 3a |.1 TAppl|ication:|
|00000c60| 3a 47 65 74 43 6f 6e 74 | 61 69 6e 65 64 4f 62 6a |:GetCont|ainedObj|
|00000c70| 65 63 74 20 64 6f 73 65 | 20 6e 6f 74 20 77 6f 72 |ect dose| not wor|
|00000c80| 6b 20 69 66 20 61 20 73 | 63 72 69 70 74 0d 2f 2f |k if a s|cript.//|
|00000c90| 61 74 74 65 6d 70 74 73 | 20 74 6f 20 67 65 74 20 |attempts| to get |
|00000ca0| 61 20 64 6f 63 75 6d 65 | 6e 74 20 74 68 61 74 20 |a docume|nt that |
|00000cb0| 64 6f 65 73 20 6e 6f 74 | 20 65 78 69 73 74 2e 20 |does not| exist. |
|00000cc0| 49 6e 20 74 68 65 20 63 | 61 73 65 20 77 68 65 72 |In the c|ase wher|
|00000cd0| 65 20 74 68 65 72 65 20 | 61 72 65 0d 2f 2f 6e 6f |e there |are.//no|
|00000ce0| 20 6f 70 65 6e 20 64 6f | 63 75 6d 65 6e 74 73 2c | open do|cuments,|
|00000cf0| 20 74 68 65 20 72 65 73 | 75 6c 74 20 69 73 20 61 | the res|ult is a|
|00000d00| 6e 20 61 63 63 65 73 73 | 20 66 61 75 6c 74 2e 20 |n access| fault. |
|00000d10| 54 68 65 72 65 66 6f 72 | 65 2c 20 49 27 6d 20 75 |Therefor|e, I'm u|
|00000d20| 73 69 6e 67 20 74 68 65 | 0d 2f 2f 66 6f 6c 6c 6f |sing the|.//follo|
|00000d30| 77 69 6e 67 20 73 75 62 | 73 74 69 74 75 74 65 20 |wing sub|stitute |
|00000d40| 63 6f 64 65 2e 0d 09 09 | 43 53 74 72 32 35 35 09 |code....|CStr255.|
|00000d50| 74 68 65 4e 61 6d 65 3b | 0d 09 09 73 65 6c 65 63 |theName;|...selec|
|00000d60| 74 69 6f 6e 44 61 74 61 | 2e 47 65 74 53 74 72 69 |tionData|.GetStri|
|00000d70| 6e 67 28 74 68 65 4e 61 | 6d 65 29 3b 09 09 0d 09 |ng(theNa|me);....|
|00000d80| 09 43 4e 6f 47 68 6f 73 | 74 44 6f 63 73 49 74 65 |.CNoGhos|tDocsIte|
|00000d90| 72 61 74 6f 72 09 69 74 | 65 72 28 74 68 69 73 29 |rator.it|er(this)|
|00000da0| 3b 0d 09 09 0d 09 09 66 | 6f 72 20 28 54 44 6f 63 |;......f|or (TDoc|
|00000db0| 75 6d 65 6e 74 2a 20 61 | 44 6f 63 75 6d 65 6e 74 |ument* a|Document|
|00000dc0| 20 3d 20 69 74 65 72 2e | 46 69 72 73 74 44 6f 63 | = iter.|FirstDoc|
|00000dd0| 75 6d 65 6e 74 28 29 3b | 20 69 74 65 72 2e 4d 6f |ument();| iter.Mo|
|00000de0| 72 65 28 29 3b 20 61 44 | 6f 63 75 6d 65 6e 74 20 |re(); aD|ocument |
|00000df0| 3d 20 69 74 65 72 2e 4e | 65 78 74 44 6f 63 75 6d |= iter.N|extDocum|
|00000e00| 65 6e 74 28 29 29 0d 09 | 09 09 7b 0d 09 09 09 09 |ent())..|..{.....|
|00000e10| 69 66 20 28 61 44 6f 63 | 75 6d 65 6e 74 20 21 3d |if (aDoc|ument !=|
|00000e20| 20 4e 55 4c 4c 29 0d 09 | 09 09 09 09 7b 0d 09 09 | NULL)..|....{...|
|00000e30| 09 09 09 09 43 53 74 72 | 32 35 35 20 6e 61 6d 65 |....CStr|255 name|
|00000e40| 20 3d 20 67 45 6d 70 74 | 79 53 74 72 69 6e 67 3b | = gEmpt|yString;|
|00000e50| 0d 09 09 09 09 09 09 61 | 44 6f 63 75 6d 65 6e 74 |.......a|Document|
|00000e60| 20 2d 3e 20 47 65 74 54 | 69 74 6c 65 28 6e 61 6d | -> GetT|itle(nam|
|00000e70| 65 29 3b 0d 09 09 09 09 | 09 09 69 66 20 28 6e 61 |e);.....|..if (na|
|00000e80| 6d 65 20 3d 3d 20 74 68 | 65 4e 61 6d 65 29 0d 09 |me == th|eName)..|
|00000e90| 09 09 09 09 09 09 7b 09 | 09 09 09 09 0d 09 09 09 |......{.|........|
|00000ea0| 09 09 09 09 09 74 68 65 | 54 77 69 73 74 44 6f 77 |.....the|TwistDow|
|00000eb0| 6e 44 6f 63 75 6d 65 6e | 74 20 3d 20 28 54 54 77 |nDocumen|t = (TTw|
|00000ec0| 69 73 74 44 6f 77 6e 44 | 6f 63 75 6d 65 6e 74 2a |istDownD|ocument*|
|00000ed0| 29 61 44 6f 63 75 6d 65 | 6e 74 3b 0d 09 09 09 09 |)aDocume|nt;.....|
|00000ee0| 09 09 09 09 72 65 73 75 | 6c 74 20 3d 20 74 68 65 |....resu|lt = the|
|00000ef0| 54 77 69 73 74 44 6f 77 | 6e 44 6f 63 75 6d 65 6e |TwistDow|nDocumen|
|00000f00| 74 3b 0d 09 09 09 09 09 | 09 09 09 72 65 74 75 72 |t;......|...retur|
|00000f10| 6e 20 72 65 73 75 6c 74 | 3b 0d 09 09 09 09 09 09 |n result|;.......|
|00000f20| 09 7d 0d 09 09 09 09 09 | 7d 0d 09 09 09 7d 0d 09 |.}......|}....}..|
|00000f30| 7d 0d 0d 0d 32 2e 20 54 | 4f 44 6f 63 43 6f 6d 6d |}...2. T|ODocComm|
|00000f40| 61 6e 64 20 61 6e 64 20 | 6c 6f 77 20 6d 65 6d 6f |and and |low memo|
|00000f50| 72 79 0d 0d 57 68 65 6e | 20 61 20 73 63 72 69 70 |ry..When| a scrip|
|00000f60| 74 20 61 73 6b 73 20 61 | 6e 20 61 70 70 6c 69 63 |t asks a|n applic|
|00000f70| 61 74 69 6f 6e 20 74 6f | 20 6f 70 65 6e 20 61 20 |ation to| open a |
|00000f80| 64 6f 63 75 6d 65 6e 74 | 20 61 6e 64 20 74 68 65 |document| and the|
|00000f90| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 72 75 6e | applica|tion run|
|00000fa0| 73 20 6f 75 74 20 6f 66 | 20 73 70 61 63 65 20 69 |s out of| space i|
|00000fb0| 6e 20 69 74 73 20 6f 62 | 6a 65 63 74 20 68 65 61 |n its ob|ject hea|
|00000fc0| 70 2c 20 74 68 65 20 63 | 6f 6d 6d 61 6e 64 20 77 |p, the c|ommand w|
|00000fd0| 69 6c 6c 20 66 61 69 6c | 2e 20 55 6e 66 6f 72 74 |ill fail|. Unfort|
|00000fe0| 75 6e 61 74 65 6c 79 2c | 20 74 68 65 20 66 61 69 |unately,| the fai|
|00000ff0| 6c 75 72 65 20 72 65 73 | 75 6c 74 73 20 69 6e 20 |lure res|ults in |
|00001000| 61 20 66 61 74 61 6c 20 | 61 63 63 65 73 73 20 66 |a fatal |access f|
|00001010| 61 75 6c 74 2e 0d 0d 54 | 68 65 20 66 6f 6c 6c 6f |ault...T|he follo|
|00001020| 77 69 6e 67 20 65 78 61 | 6d 70 6c 65 20 73 63 72 |wing exa|mple scr|
|00001030| 69 70 74 20 63 61 75 73 | 65 73 20 74 68 65 20 70 |ipt caus|es the p|
|00001040| 72 6f 62 6c 65 6d 3a 0d | 0d 74 65 6c 6c 20 61 70 |roblem:.|.tell ap|
|00001050| 70 6c 69 63 61 74 69 6f | 6e 20 22 54 77 69 73 74 |plicatio|n "Twist|
|00001060| 20 44 6f 77 6e 20 4c 69 | 73 74 73 22 0d 09 61 63 | Down Li|sts"..ac|
|00001070| 74 69 76 61 74 65 0d 09 | 6f 70 65 6e 20 7b 61 6c |tivate..|open {al|
|00001080| 69 61 73 20 22 4d 50 57 | 3a 22 7d 0d 09 65 78 70 |ias "MPW|:"}..exp|
|00001090| 61 6e 64 20 61 6c 6c 20 | 64 6f 63 75 6d 65 6e 74 |and all |document|
|000010a0| 20 22 4d 50 57 22 0d 09 | 6f 70 65 6e 20 7b 61 6c | "MPW"..|open {al|
|000010b0| 69 61 73 20 22 47 65 6e | 65 72 61 6c 3a 22 7d 0d |ias "Gen|eral:"}.|
|000010c0| 09 65 78 70 61 6e 64 20 | 61 6c 6c 20 64 6f 63 75 |.expand |all docu|
|000010d0| 6d 65 6e 74 20 22 47 65 | 6e 65 72 61 6c 22 0d 09 |ment "Ge|neral"..|
|000010e0| 6f 70 65 6e 20 7b 61 6c | 69 61 73 20 22 44 61 74 |open {al|ias "Dat|
|000010f0| 61 32 3a 22 7d 0d 09 65 | 78 70 61 6e 64 20 61 6c |a2:"}..e|xpand al|
|00001100| 6c 20 64 6f 63 75 6d 65 | 6e 74 20 22 44 61 74 61 |l docume|nt "Data|
|00001110| 32 22 0d 09 6f 70 65 6e | 20 7b 61 6c 69 61 73 20 |2"..open| {alias |
|00001120| 22 44 61 74 61 31 3a 22 | 7d 0d 09 65 78 70 61 6e |"Data1:"|}..expan|
|00001130| 64 20 61 6c 6c 20 64 6f | 63 75 6d 65 6e 74 20 22 |d all do|cument "|
|00001140| 44 61 74 61 31 22 0d 09 | 6f 70 65 6e 20 7b 61 6c |Data1"..|open {al|
|00001150| 69 61 73 20 22 44 61 74 | 61 3a 22 7d 0d 09 65 78 |ias "Dat|a:"}..ex|
|00001160| 70 61 6e 64 20 61 6c 6c | 20 64 6f 63 75 6d 65 6e |pand all| documen|
|00001170| 74 20 22 44 61 74 61 22 | 0d 09 6f 70 65 6e 20 7b |t "Data"|..open {|
|00001180| 61 6c 69 61 73 20 22 53 | 79 73 74 65 6d 3a 22 7d |alias "S|ystem:"}|
|00001190| 0d 09 65 78 70 61 6e 64 | 20 61 6c 6c 20 64 6f 63 |..expand| all doc|
|000011a0| 75 6d 65 6e 74 20 22 53 | 79 73 74 65 6d 22 0d 65 |ument "S|ystem".e|
|000011b0| 6e 64 20 74 65 6c 6c 0d | 0d 49 74 20 69 73 20 6e |nd tell.|.It is n|
|000011c0| 6f 74 68 69 6e 67 20 62 | 75 74 20 61 6e 20 61 6c |othing b|ut an al|
|000011d0| 74 65 72 6e 61 74 69 6e | 67 20 73 65 71 75 65 6e |ternatin|g sequen|
|000011e0| 63 65 20 6f 66 20 6f 70 | 65 6e 73 20 61 6e 64 20 |ce of op|ens and |
|000011f0| 65 78 70 61 6e 64 20 61 | 6c 6c 73 2e 20 57 68 65 |expand a|lls. Whe|
|00001200| 6e 20 54 77 69 73 74 20 | 44 6f 77 6e 20 4c 69 73 |n Twist |Down Lis|
|00001210| 74 73 20 72 75 6e 73 20 | 6f 75 74 20 6f 66 20 73 |ts runs |out of s|
|00001220| 70 61 63 65 20 69 6e 20 | 74 68 65 20 6f 62 6a 65 |pace in |the obje|
|00001230| 63 74 20 68 65 61 70 2c | 20 54 43 6f 6d 6d 61 6e |ct heap,| TComman|
|00001240| 64 48 61 6e 64 6c 65 72 | 3a 3a 44 6f 50 65 72 66 |dHandler|::DoPerf|
|00001250| 6f 72 6d 43 6f 6d 6d 61 | 6e 64 20 63 61 74 63 68 |ormComma|nd catch|
|00001260| 65 73 20 69 74 20 61 6e | 64 20 73 69 67 6e 61 6c |es it an|d signal|
|00001270| 73 20 54 4f 44 6f 63 43 | 6f 6d 6d 61 6e 64 20 74 |s TODocC|ommand t|
|00001280| 6f 20 0d 0d 76 6f 69 64 | 20 54 53 65 72 76 65 72 |o ..void| TServer|
|00001290| 43 6f 6d 6d 61 6e 64 3a | 3a 53 65 74 56 61 6c 69 |Command:|:SetVali|
|000012a0| 64 61 74 69 6f 6e 45 72 | 72 6f 72 28 4f 53 45 72 |dationEr|ror(OSEr|
|000012b0| 72 20 65 72 72 6f 72 29 | 0d 7b 0d 09 2f 2f 20 54 |r error)|.{..// T|
|000012c0| 68 65 20 66 69 6e 64 65 | 72 20 70 61 73 73 65 73 |he finde|r passes|
|000012d0| 20 61 20 6e 75 6c 6c 20 | 72 65 70 6c 79 20 77 69 | a null |reply wi|
|000012e0| 74 68 20 72 65 71 75 69 | 72 65 64 20 65 76 65 6e |th requi|red even|
|000012f0| 74 73 0d 09 2f 2f 20 73 | 6f 20 64 6f 6e 27 74 20 |ts..// s|o don't |
|00001300| 74 72 79 20 74 6f 20 73 | 74 75 66 66 20 61 6e 79 |try to s|tuff any|
|00001310| 20 69 6e 66 6f 20 69 6e | 74 6f 20 74 68 65 20 72 | info in|to the r|
|00001320| 65 70 6c 79 0d 09 69 66 | 20 28 66 52 65 70 6c 79 |eply..if| (fReply|
|00001330| 20 26 26 20 66 52 65 70 | 6c 79 2d 3e 66 4d 65 73 | && fRep|ly->fMes|
|00001340| 73 61 67 65 2e 64 65 73 | 63 72 69 70 74 6f 72 54 |sage.des|criptorT|
|00001350| 79 70 65 20 21 3d 20 74 | 79 70 65 4e 75 6c 6c 29 |ype != t|ypeNull)|
|00001360| 0d 09 09 66 52 65 70 6c | 79 2d 3e 57 72 69 74 65 |...fRepl|y->Write|
|00001370| 4f 53 45 72 72 6f 72 28 | 65 72 72 6f 72 29 3b 0d |OSError(|error);.|
|00001380| 09 49 6e 68 65 72 69 74 | 65 64 3a 3a 53 65 74 56 |.Inherit|ed::SetV|
|00001390| 61 6c 69 64 61 74 69 6f | 6e 45 72 72 6f 72 28 65 |alidatio|nError(e|
|000013a0| 72 72 6f 72 29 3b 0d 7d | 0d 0d 77 68 69 63 68 2c |rror);.}|..which,|
|000013b0| 20 69 6e 20 74 75 72 6e | 20 73 69 67 6e 61 6c 73 | in turn| signals|
|000013c0| 20 66 52 65 70 6c 79 20 | 74 6f 0d 0d 76 6f 69 64 | fReply |to..void|
|000013d0| 20 54 41 70 70 6c 65 45 | 76 65 6e 74 3a 3a 57 72 | TAppleE|vent::Wr|
|000013e0| 69 74 65 4f 53 45 72 72 | 6f 72 28 4f 53 45 72 72 |iteOSErr|or(OSErr|
|000013f0| 20 65 72 72 6f 72 29 0d | 7b 0d 09 69 66 20 28 74 | error).|{..if (t|
|00001400| 68 69 73 2d 3e 66 4d 65 | 73 73 61 67 65 2e 64 65 |his->fMe|ssage.de|
|00001410| 73 63 72 69 70 74 6f 72 | 54 79 70 65 20 21 3d 20 |scriptor|Type != |
|00001420| 74 79 70 65 4e 75 6c 6c | 20 26 26 20 74 68 69 73 |typeNull| && this|
|00001430| 2d 3e 66 4d 65 73 73 61 | 67 65 2e 64 61 74 61 48 |->fMessa|ge.dataH|
|00001440| 61 6e 64 6c 65 29 0d 09 | 7b 09 0d 09 09 43 53 74 |andle)..|{....CSt|
|00001450| 72 32 35 35 20 65 72 72 | 53 74 72 3b 0d 09 09 74 |r255 err|Str;...t|
|00001460| 68 69 73 2d 3e 57 72 69 | 74 65 4c 6f 6e 67 28 6b |his->Wri|teLong(k|
|00001470| 65 79 45 72 72 6f 72 4e | 75 6d 62 65 72 2c 20 65 |eyErrorN|umber, e|
|00001480| 72 72 41 45 45 76 65 6e | 74 46 61 69 6c 65 64 29 |rrAEEven|tFailed)|
|00001490| 3b 0d 09 09 69 66 20 28 | 21 4c 6f 6f 6b 75 70 45 |;...if (|!LookupE|
|000014a0| 72 72 53 74 72 69 6e 67 | 28 65 72 72 6f 72 2c 20 |rrString|(error, |
|000014b0| 65 72 72 52 65 61 73 6f | 6e 49 44 2c 20 65 72 72 |errReaso|nID, err|
|000014c0| 53 74 72 29 29 0d 09 09 | 7b 0d 09 09 09 2f 2f 20 |Str))...|{....// |
|000014d0| 4e 6f 20 65 72 72 6f 72 | 20 73 74 72 69 6e 67 20 |No error| string |
|000014e0| 77 61 73 20 66 6f 75 6e | 64 2c 20 73 75 62 73 74 |was foun|d, subst|
|000014f0| 69 74 75 74 65 20 74 68 | 65 20 67 65 6e 65 72 69 |itute th|e generi|
|00001500| 63 20 6f 6e 65 2e 0d 09 | 09 09 43 53 74 72 32 35 |c one...|..CStr25|
|00001510| 35 20 65 72 72 4e 75 6d | 53 74 72 3b 0d 09 09 09 |5 errNum|Str;....|
|00001520| 4c 6f 6f 6b 75 70 45 72 | 72 53 74 72 69 6e 67 28 |LookupEr|rString(|
|00001530| 65 72 72 47 65 6e 65 72 | 69 63 45 72 72 6f 72 57 |errGener|icErrorW|
|00001540| 69 74 68 4e 75 6d 2c 20 | 65 72 72 52 65 61 73 6f |ithNum, |errReaso|
|00001550| 6e 49 44 2c 20 65 72 72 | 53 74 72 29 3b 0d 09 09 |nID, err|Str);...|
|00001560| 09 4e 75 6d 54 6f 53 74 | 72 69 6e 67 28 65 72 72 |.NumToSt|ring(err|
|00001570| 6f 72 2c 20 65 72 72 4e | 75 6d 53 74 72 29 3b 0d |or, errN|umStr);.|
|00001580| 09 09 09 4d 41 50 61 72 | 61 6d 54 65 78 74 28 22 |...MAPar|amText("|
|00001590| 5e 45 4e 55 4d 22 2c 20 | 65 72 72 4e 75 6d 53 74 |^ENUM", |errNumSt|
|000015a0| 72 29 3b 0d 09 09 09 4d | 41 52 65 70 6c 61 63 65 |r);....M|AReplace|
|000015b0| 54 65 78 74 28 65 72 72 | 53 74 72 29 3b 0d 09 09 |Text(err|Str);...|
|000015c0| 7d 0d 09 09 0d 09 09 74 | 68 69 73 2d 3e 57 72 69 |}......t|his->Wri|
|000015d0| 74 65 53 74 72 69 6e 67 | 28 6b 65 79 45 72 72 6f |teString|(keyErro|
|000015e0| 72 53 74 72 69 6e 67 2c | 20 65 72 72 53 74 72 29 |rString,| errStr)|
|000015f0| 3b 0d 09 7d 0d 7d 0d 0d | 61 6e 64 20 77 68 65 6e |;..}.}..|and when|
|00001600| 20 69 74 20 61 74 74 65 | 6d 70 74 73 20 74 6f 20 | it atte|mpts to |
|00001610| 61 63 74 75 61 6c 6c 79 | 20 77 72 69 74 65 20 74 |actually| write t|
|00001620| 68 65 20 65 72 72 6f 72 | 20 69 6e 74 6f 20 66 52 |he error| into fR|
|00001630| 65 70 6c 79 0d 0d 76 6f | 69 64 20 54 41 70 70 6c |eply..vo|id TAppl|
|00001640| 65 45 76 65 6e 74 3a 3a | 57 72 69 74 65 4c 6f 6e |eEvent::|WriteLon|
|00001650| 67 28 63 6f 6e 73 74 20 | 41 45 4b 65 79 77 6f 72 |g(const |AEKeywor|
|00001660| 64 20 74 68 65 4b 65 79 | 2c 6c 6f 6e 67 20 74 68 |d theKey|,long th|
|00001670| 65 44 61 74 61 29 0d 7b | 0d 09 41 70 70 6c 65 45 |eData).{|..AppleE|
|00001680| 76 65 6e 74 20 74 68 65 | 4d 65 73 73 61 67 65 20 |vent the|Message |
|00001690| 3d 20 66 4d 65 73 73 61 | 67 65 3b 0d 0d 09 46 61 |= fMessa|ge;...Fa|
|000016a0| 69 6c 4f 53 45 72 72 28 | 41 45 50 75 74 50 61 72 |ilOSErr(|AEPutPar|
|000016b0| 61 6d 50 74 72 28 26 74 | 68 65 4d 65 73 73 61 67 |amPtr(&t|heMessag|
|000016c0| 65 2c 20 74 68 65 4b 65 | 79 2c 20 74 79 70 65 4c |e, theKe|y, typeL|
|000016d0| 6f 6e 67 49 6e 74 65 67 | 65 72 2c 0d 09 09 09 09 |ongInteg|er,.....|
|000016e0| 09 09 09 26 20 74 68 65 | 44 61 74 61 2c 20 73 69 |...& the|Data, si|
|000016f0| 7a 65 6f 66 28 74 68 65 | 44 61 74 61 29 29 29 3b |zeof(the|Data)));|
|00001700| 0d 7d 20 2f 2f 20 54 41 | 70 70 6c 65 45 76 65 6e |.} // TA|ppleEven|
|00001710| 74 3a 3a 57 72 69 74 65 | 4c 6f 6e 67 0d 0d 77 65 |t::Write|Long..we|
|00001720| 20 66 61 69 6c 2c 20 61 | 67 61 69 6e 2e 0d 0d 54 | fail, a|gain...T|
|00001730| 68 69 73 20 69 73 20 61 | 20 6e 61 73 74 79 20 6f |his is a| nasty o|
|00001740| 6e 65 2c 20 62 65 63 61 | 75 73 65 20 6e 6f 77 20 |ne, beca|use now |
|00001750| 79 6f 75 20 67 65 74 20 | 74 68 65 20 66 61 74 61 |you get |the fata|
|00001760| 6c 20 61 63 63 65 73 73 | 20 66 61 75 6c 74 2e 20 |l access| fault. |
|00001770| 53 6f 6d 65 74 68 69 6e | 67 20 62 61 64 20 68 61 |Somethin|g bad ha|
|00001780| 73 20 68 61 70 70 65 6e | 65 64 20 74 6f 20 66 52 |s happen|ed to fR|
|00001790| 65 70 6c 79 20 61 6e 64 | 20 61 74 20 74 68 69 73 |eply and| at this|
|000017a0| 20 70 6f 69 6e 74 20 49 | 20 64 6f 20 6e 6f 74 20 | point I| do not |
|000017b0| 6b 6e 6f 77 20 65 78 61 | 63 74 6c 79 20 77 68 61 |know exa|ctly wha|
|000017c0| 74 20 69 74 20 69 73 20 | 62 75 74 20 69 74 20 61 |t it is |but it a|
|000017d0| 70 70 65 61 72 73 20 74 | 68 61 74 20 77 68 61 74 |ppears t|hat what|
|000017e0| 65 76 65 72 20 74 68 65 | 20 62 61 64 20 74 68 69 |ever the| bad thi|
|000017f0| 6e 67 20 69 73 20 68 61 | 70 70 65 6e 65 64 20 74 |ng is ha|ppened t|
|00001800| 6f 20 74 68 65 4d 65 73 | 73 61 67 65 2e 20 54 68 |o theMes|sage. Th|
|00001810| 65 20 65 72 72 6f 72 20 | 67 65 6e 65 72 61 74 65 |e error |generate|
|00001820| 64 20 6a 75 73 74 20 62 | 65 66 6f 72 65 20 74 68 |d just b|efore th|
|00001830| 65 20 61 63 63 65 73 73 | 20 66 61 75 6c 74 20 69 |e access| fault i|
|00001840| 73 3a 0d 0d 6d 65 6d 57 | 5a 45 72 72 20 3d 20 2d |s:..memW|ZErr = -|
|00001850| 31 31 31 2c 09 2f 2a 57 | 68 69 63 68 5a 6f 6e 65 |111,./*W|hichZone|
|00001860| 20 66 61 69 6c 65 64 20 | 28 61 70 70 6c 69 65 64 | failed |(applied|
|00001870| 20 74 6f 20 66 72 65 65 | 20 62 6c 6f 63 6b 29 2a | to free| block)*|
|00001880| 2f 2e 0d 0d 48 6f 77 65 | 76 65 72 2c 20 74 68 65 |/...Howe|ver, the|
|00001890| 20 54 53 65 72 76 65 72 | 43 6f 6d 6d 61 6e 64 20 | TServer|Command |
|000018a0| 63 6f 6e 73 74 72 75 63 | 74 6f 72 20 73 65 74 73 |construc|tor sets|
|000018b0| 20 74 68 65 20 66 69 65 | 6c 64 20 66 53 75 73 70 | the fie|ld fSusp|
|000018c0| 65 6e 64 54 68 65 45 76 | 65 6e 74 20 3d 20 46 41 |endTheEv|ent = FA|
|000018d0| 4c 53 45 2e 20 49 66 20 | 69 74 20 69 73 20 73 65 |LSE. If |it is se|
|000018e0| 74 20 74 6f 20 54 52 55 | 45 2c 20 74 68 65 72 65 |t to TRU|E, there|
|000018f0| 20 69 73 20 6e 6f 20 70 | 72 6f 62 6c 65 6d 2e 20 | is no p|roblem. |
|00001900| 49 20 62 65 6c 69 65 76 | 65 20 74 68 65 20 64 65 |I believ|e the de|
|00001910| 66 61 75 6c 74 20 76 61 | 6c 75 65 20 66 6f 72 20 |fault va|lue for |
|00001920| 66 53 75 73 70 65 6e 64 | 54 68 65 45 76 65 6e 74 |fSuspend|TheEvent|
|00001930| 20 73 68 6f 75 6c 64 20 | 62 65 20 54 52 55 45 2e | should |be TRUE.|
|00001940| 20 49 66 20 79 6f 75 20 | 63 68 6f 6f 73 65 20 74 | If you |choose t|
|00001950| 6f 20 73 65 74 20 69 74 | 20 74 6f 20 54 52 55 45 |o set it| to TRUE|
|00001960| 2c 20 79 6f 75 20 6d 75 | 73 74 20 64 6f 20 69 74 |, you mu|st do it|
|00001970| 20 62 65 66 6f 72 65 20 | 49 53 65 72 76 65 72 43 | before |IServerC|
|00001980| 6f 6d 6d 61 6e 64 20 69 | 73 20 65 78 65 63 75 74 |ommand i|s execut|
|00001990| 65 64 20 62 65 63 61 75 | 73 20 69 74 20 69 73 20 |ed becau|s it is |
|000019a0| 49 53 65 72 76 65 72 43 | 6f 6d 6d 61 6e 64 20 74 |IServerC|ommand t|
|000019b0| 68 61 74 20 73 75 73 70 | 65 6e 64 73 20 74 68 65 |hat susp|ends the|
|000019c0| 20 65 76 65 6e 74 2e 20 | 0d 0d 4e 6f 74 65 20 74 | event. |..Note t|
|000019d0| 68 61 74 20 74 68 65 20 | 65 78 61 6d 70 6c 65 20 |hat the |example |
|000019e0| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 49 63 6f 6e |applicat|ion Icon|
|000019f0| 20 45 64 69 74 20 65 78 | 68 69 62 69 74 73 20 74 | Edit ex|hibits t|
|00001a00| 68 65 20 73 61 6d 65 20 | 62 65 68 61 76 69 6f 72 |he same |behavior|
|00001a10| 20 77 68 65 6e 20 61 20 | 73 63 72 69 70 74 20 74 | when a |script t|
|00001a20| 65 6c 6c 73 20 69 74 20 | 74 6f 20 6f 70 65 6e 20 |ells it |to open |
|00001a30| 65 6e 6f 75 67 68 20 64 | 6f 63 75 6d 65 6e 74 73 |enough d|ocuments|
|00001a40| 20 74 6f 20 63 61 75 73 | 65 20 69 74 20 74 6f 20 | to caus|e it to |
|00001a50| 72 75 6e 20 6f 75 74 20 | 6f 66 20 73 70 61 63 65 |run out |of space|
|00001a60| 20 69 6e 20 69 74 73 20 | 6f 62 6a 65 63 74 20 68 | in its |object h|
|00001a70| 65 61 70 2e 0d 0d 0d 0d | 33 2e 20 54 53 65 74 50 |eap.....|3. TSetP|
|00001a80| 72 6f 70 65 72 74 79 45 | 76 65 6e 74 20 6d 65 6d |ropertyE|vent mem|
|00001a90| 6f 72 79 20 6c 65 61 6b | 0d 0d 49 6e 69 74 69 61 |ory leak|..Initia|
|00001aa0| 6c 6c 79 2c 20 49 20 75 | 73 65 64 20 61 73 20 61 |lly, I u|sed as a|
|00001ab0| 20 74 65 6d 70 6c 61 74 | 65 20 66 6f 72 20 68 61 | templat|e for ha|
|00001ac0| 6e 64 6c 69 6e 67 20 74 | 68 65 20 54 53 65 74 50 |ndling t|he TSetP|
|00001ad0| 72 6f 70 65 72 74 79 45 | 76 65 6e 74 20 74 68 65 |ropertyE|vent the|
|00001ae0| 20 63 6f 64 65 20 67 69 | 76 65 6e 20 69 6e 20 74 | code gi|ven in t|
|00001af0| 68 65 20 49 63 6f 6e 20 | 45 64 69 74 20 65 78 70 |he Icon |Edit exp|
|00001b00| 61 6d 70 6c 65 2c 20 65 | 78 63 65 72 70 74 65 64 |ample, e|xcerpted|
|00001b10| 20 62 65 6c 6f 77 3a 0d | 0d 09 63 61 73 65 20 63 | below:.|..case c|
|00001b20| 53 65 74 43 6f 6c 6f 72 | 3a 0d 09 09 7b 0d 09 09 |SetColor|:...{...|
|00001b30| 09 43 52 47 42 43 6f 6c | 6f 72 09 6e 65 77 43 6f |.CRGBCol|or.newCo|
|00001b40| 6c 6f 72 3b 0d 09 09 09 | 43 53 74 72 32 35 35 09 |lor;....|CStr255.|
|00001b50| 09 74 68 65 50 72 6f 6d | 70 74 20 3d 20 22 50 69 |.theProm|pt = "Pi|
|00001b60| 63 6b 20 61 20 6e 65 77 | 20 63 6f 6c 6f 72 22 3b |ck a new| color";|
|00001b70| 0d 09 09 09 69 66 20 28 | 47 65 74 43 6f 6c 6f 72 |....if (|GetColor|
|00001b80| 28 6b 42 65 73 74 53 79 | 73 74 65 6d 4c 6f 63 61 |(kBestSy|stemLoca|
|00001b90| 74 69 6f 6e 2c 20 74 68 | 65 50 72 6f 6d 70 74 2c |tion, th|ePrompt,|
|00001ba0| 20 66 43 6f 6c 6f 72 2c | 20 6e 65 77 43 6f 6c 6f | fColor,| newColo|
|00001bb0| 72 29 29 0d 09 09 09 7b | 0d 09 09 09 09 69 66 20 |r))....{|.....if |
|00001bc0| 28 54 4f 53 41 44 69 73 | 70 61 74 63 68 65 72 3a |(TOSADis|patcher:|
|00001bd0| 3a 66 67 44 69 73 70 61 | 74 63 68 65 72 2d 3e 47 |:fgDispa|tcher->G|
|00001be0| 65 74 44 65 66 61 75 6c | 74 54 61 72 67 65 74 28 |etDefaul|tTarget(|
|00001bf0| 29 2d 3e 49 73 52 65 63 | 6f 72 64 69 6e 67 4f 6e |)->IsRec|ordingOn|
|00001c00| 28 29 29 0d 09 09 09 09 | 7b 0d 09 09 09 09 09 54 |()).....|{......T|
|00001c10| 53 65 74 50 72 6f 70 65 | 72 74 79 45 76 65 6e 74 |SetPrope|rtyEvent|
|00001c20| 20 2a 61 70 70 6c 65 45 | 76 65 6e 74 20 3d 20 6e | *appleE|vent = n|
|00001c30| 65 77 20 54 53 65 74 50 | 72 6f 70 65 72 74 79 45 |ew TSetP|ropertyE|
|00001c40| 76 65 6e 74 3b 0d 09 09 | 09 09 09 61 70 70 6c 65 |vent;...|...apple|
|00001c50| 45 76 65 6e 74 2d 3e 49 | 53 65 74 50 72 6f 70 65 |Event->I|SetPrope|
|00001c60| 72 74 79 45 76 65 6e 74 | 28 67 53 65 72 76 65 72 |rtyEvent|(gServer|
|00001c70| 41 64 64 72 65 73 73 2c | 20 6b 41 45 4e 6f 52 65 |Address,| kAENoRe|
|00001c80| 70 6c 79 2c 20 74 68 69 | 73 2c 20 70 43 6f 6c 6f |ply, thi|s, pColo|
|00001c90| 72 29 3b 0d 09 09 09 09 | 09 43 54 65 6d 70 44 65 |r);.....|.CTempDe|
|00001ca0| 73 63 20 74 68 65 4e 65 | 77 43 6f 6c 6f 72 3b 0d |sc theNe|wColor;.|
|00001cb0| 09 09 09 09 09 74 68 65 | 4e 65 77 43 6f 6c 6f 72 |.....the|NewColor|
|00001cc0| 2e 50 75 74 52 47 42 43 | 6f 6c 6f 72 28 6e 65 77 |.PutRGBC|olor(new|
|00001cd0| 43 6f 6c 6f 72 29 3b 0d | 09 09 09 09 09 61 70 70 |Color);.|.....app|
|00001ce0| 6c 65 45 76 65 6e 74 2d | 3e 57 72 69 74 65 50 61 |leEvent-|>WritePa|
|00001cf0| 72 61 6d 65 74 65 72 28 | 6b 65 79 41 45 44 61 74 |rameter(|keyAEDat|
|00001d00| 61 2c 20 74 68 65 4e 65 | 77 43 6f 6c 6f 72 29 3b |a, theNe|wColor);|
|00001d10| 0d 09 09 09 09 09 61 70 | 70 6c 65 45 76 65 6e 74 |......ap|pleEvent|
|00001d20| 2d 3e 53 65 6e 64 28 29 | 3b 0d 09 09 09 09 7d 0d |->Send()|;.....}.|
|00001d30| 09 09 09 09 65 6c 73 65 | 0d 09 09 09 09 7b 0d 09 |....else|.....{..|
|00001d40| 09 09 09 09 54 53 65 74 | 43 6f 6c 6f 72 43 6f 6d |....TSet|ColorCom|
|00001d50| 6d 61 6e 64 20 2a 61 53 | 65 74 43 6f 6c 6f 72 43 |mand *aS|etColorC|
|00001d60| 6f 6d 6d 61 6e 64 20 3d | 20 6e 65 77 20 54 53 65 |ommand =| new TSe|
|00001d70| 74 43 6f 6c 6f 72 43 6f | 6d 6d 61 6e 64 28 29 3b |tColorCo|mmand();|
|00001d80| 0d 09 09 09 09 09 61 53 | 65 74 43 6f 6c 6f 72 43 |......aS|etColorC|
|00001d90| 6f 6d 6d 61 6e 64 2d 3e | 49 53 65 74 43 6f 6c 6f |ommand->|ISetColo|
|00001da0| 72 43 6f 6d 6d 61 6e 64 | 28 74 68 69 73 2c 20 6e |rCommand|(this, n|
|00001db0| 65 77 43 6f 6c 6f 72 29 | 3b 0d 09 09 09 09 09 50 |ewColor)|;......P|
|00001dc0| 6f 73 74 43 6f 6d 6d 61 | 6e 64 28 61 53 65 74 43 |ostComma|nd(aSetC|
|00001dd0| 6f 6c 6f 72 43 6f 6d 6d | 61 6e 64 29 3b 0d 09 09 |olorComm|and);...|
|00001de0| 09 09 7d 0d 09 09 09 7d | 0d 09 09 7d 0d 09 62 72 |..}....}|...}..br|
|00001df0| 65 61 6b 3b 0d 0d 55 6e | 66 6f 72 74 75 6e 61 74 |eak;..Un|fortunat|
|00001e00| 65 6c 79 2c 20 74 68 65 | 20 61 70 70 6c 65 45 76 |ely, the| appleEv|
|00001e10| 65 6e 74 20 69 73 20 6e | 65 76 65 72 20 66 72 65 |ent is n|ever fre|
|00001e20| 65 64 20 61 6e 64 20 74 | 68 65 20 61 70 70 6c 65 |ed and t|he apple|
|00001e30| 45 76 65 6e 74 2d 3e 53 | 65 6e 64 28 29 3b 20 72 |Event->S|end(); r|
|00001e40| 65 73 75 6c 74 73 20 69 | 6e 20 61 20 72 65 70 6c |esults i|n a repl|
|00001e50| 79 45 76 65 6e 74 20 62 | 65 69 6e 67 20 63 72 65 |yEvent b|eing cre|
|00001e60| 61 74 65 64 20 61 6e 64 | 20 72 65 74 75 72 6e 65 |ated and| returne|
|00001e70| 64 2e 20 54 68 61 74 20 | 72 65 70 6c 79 20 65 76 |d. That |reply ev|
|00001e80| 65 6e 74 20 69 73 20 61 | 6c 73 6f 20 6e 6f 74 20 |ent is a|lso not |
|00001e90| 66 72 65 65 64 2e 20 54 | 68 69 73 20 69 73 20 61 |freed. T|his is a|
|00001ea0| 20 76 65 72 79 20 63 6c | 65 61 72 20 63 61 73 65 | very cl|ear case|
|00001eb0| 20 77 68 65 72 65 20 6f | 62 6a 65 63 74 20 63 6f | where o|bject co|
|00001ec0| 75 6e 74 69 6e 67 20 69 | 73 20 76 65 72 79 20 68 |unting i|s very h|
|00001ed0| 65 6c 70 66 75 6c 2e 20 | 57 69 74 68 6f 75 74 20 |elpful. |Without |
|00001ee0| 69 74 2c 20 79 6f 75 20 | 6d 61 79 20 6e 6f 74 20 |it, you |may not |
|00001ef0| 64 69 73 63 6f 76 65 72 | 20 74 68 69 73 20 6d 65 |discover| this me|
|00001f00| 6d 6f 72 79 20 6c 65 61 | 6b 20 75 6e 74 69 6c 20 |mory lea|k until |
|00001f10| 77 65 6c 6c 20 61 66 74 | 65 72 20 74 68 65 20 61 |well aft|er the a|
|00001f20| 70 70 6c 69 63 61 74 69 | 6f 6e 20 68 61 73 20 73 |pplicati|on has s|
|00001f30| 68 69 70 70 65 64 2e 20 | 57 69 74 68 20 6f 62 6a |hipped. |With obj|
|00001f40| 65 63 74 20 63 6f 75 6e | 74 69 6e 67 2c 20 79 6f |ect coun|ting, yo|
|00001f50| 75 20 64 69 73 63 6f 76 | 65 72 20 74 68 65 20 70 |u discov|er the p|
|00001f60| 72 6f 62 6c 65 6d 20 76 | 65 72 79 20 71 75 69 63 |roblem v|ery quic|
|00001f70| 6b 6c 79 2e 20 57 69 74 | 68 20 6f 62 6a 65 63 74 |kly. Wit|h object|
|00001f80| 20 64 69 73 70 6c 61 79 | 2c 20 79 6f 75 20 79 6f | display|, you yo|
|00001f90| 75 20 71 75 69 63 6b 6c | 79 20 64 69 73 63 6f 76 |u quickl|y discov|
|00001fa0| 65 72 20 74 68 61 74 20 | 79 6f 75 20 68 61 76 65 |er that |you have|
|00001fb0| 20 74 77 6f 20 41 70 70 | 6c 65 20 65 76 65 6e 74 | two App|le event|
|00001fc0| 73 20 74 68 61 74 20 68 | 61 76 65 20 6e 6f 74 20 |s that h|ave not |
|00001fd0| 62 65 65 6e 20 66 72 65 | 65 64 2e 20 54 68 65 6e |been fre|ed. Then|
|00001fe0| 2c 20 69 74 20 69 73 20 | 61 20 71 75 65 73 74 69 |, it is |a questi|
|00001ff0| 6f 6e 20 6f 66 20 64 65 | 63 69 64 69 6e 67 20 68 |on of de|ciding h|
|00002000| 6f 77 20 74 6f 20 73 6f | 6c 76 65 20 74 68 65 20 |ow to so|lve the |
|00002010| 70 72 6f 62 6c 65 6d 2e | 0d 0d 54 68 65 20 66 6f |problem.|..The fo|
|00002020| 6c 6c 6f 77 69 6e 67 20 | 63 6f 64 65 20 73 6e 69 |llowing |code sni|
|00002030| 70 70 65 74 20 73 68 6f | 77 73 20 68 6f 77 20 74 |ppet sho|ws how t|
|00002040| 6f 20 73 6f 6c 76 65 20 | 74 68 69 73 20 70 72 6f |o solve |this pro|
|00002050| 62 6c 65 6d 2e 0d 0d 09 | 63 61 73 65 20 63 53 65 |blem....|case cSe|
|00002060| 74 43 6f 6c 6f 72 3a 0d | 09 09 7b 0d 09 09 09 43 |tColor:.|..{....C|
|00002070| 52 47 42 43 6f 6c 6f 72 | 09 6e 65 77 43 6f 6c 6f |RGBColor|.newColo|
|00002080| 72 3b 0d 09 09 09 43 53 | 74 72 32 35 35 09 09 74 |r;....CS|tr255..t|
|00002090| 68 65 50 72 6f 6d 70 74 | 20 3d 20 22 50 69 63 6b |hePrompt| = "Pick|
|000020a0| 20 61 20 6e 65 77 20 63 | 6f 6c 6f 72 22 3b 0d 09 | a new c|olor";..|
|000020b0| 09 09 69 66 20 28 47 65 | 74 43 6f 6c 6f 72 28 6b |..if (Ge|tColor(k|
|000020c0| 42 65 73 74 53 79 73 74 | 65 6d 4c 6f 63 61 74 69 |BestSyst|emLocati|
|000020d0| 6f 6e 2c 20 74 68 65 50 | 72 6f 6d 70 74 2c 20 66 |on, theP|rompt, f|
|000020e0| 43 6f 6c 6f 72 2c 20 6e | 65 77 43 6f 6c 6f 72 29 |Color, n|ewColor)|
|000020f0| 29 0d 09 09 09 7b 0d 09 | 09 09 09 69 66 20 28 54 |)....{..|...if (T|
|00002100| 4f 53 41 44 69 73 70 61 | 74 63 68 65 72 3a 3a 66 |OSADispa|tcher::f|
|00002110| 67 44 69 73 70 61 74 63 | 68 65 72 2d 3e 47 65 74 |gDispatc|her->Get|
|00002120| 44 65 66 61 75 6c 74 54 | 61 72 67 65 74 28 29 2d |DefaultT|arget()-|
|00002130| 3e 49 73 52 65 63 6f 72 | 64 69 6e 67 4f 6e 28 29 |>IsRecor|dingOn()|
|00002140| 29 0d 09 09 09 09 7b 0d | 09 09 09 09 09 54 53 65 |).....{.|.....TSe|
|00002150| 74 50 72 6f 70 65 72 74 | 79 45 76 65 6e 74 20 2a |tPropert|yEvent *|
|00002160| 61 70 70 6c 65 45 76 65 | 6e 74 20 3d 20 6e 65 77 |appleEve|nt = new|
|00002170| 20 54 53 65 74 50 72 6f | 70 65 72 74 79 45 76 65 | TSetPro|pertyEve|
|00002180| 6e 74 3b 0d 09 09 09 09 | 09 61 70 70 6c 65 45 76 |nt;.....|.appleEv|
|00002190| 65 6e 74 2d 3e 49 53 65 | 74 50 72 6f 70 65 72 74 |ent->ISe|tPropert|
|000021a0| 79 45 76 65 6e 74 28 67 | 53 65 72 76 65 72 41 64 |yEvent(g|ServerAd|
|000021b0| 64 72 65 73 73 2c 20 6b | 41 45 4e 6f 52 65 70 6c |dress, k|AENoRepl|
|000021c0| 79 2c 20 74 68 69 73 2c | 20 70 43 6f 6c 6f 72 29 |y, this,| pColor)|
|000021d0| 3b 0d 09 09 09 09 09 43 | 54 65 6d 70 44 65 73 63 |;......C|TempDesc|
|000021e0| 20 74 68 65 4e 65 77 43 | 6f 6c 6f 72 3b 0d 09 09 | theNewC|olor;...|
|000021f0| 09 09 09 74 68 65 4e 65 | 77 43 6f 6c 6f 72 2e 50 |...theNe|wColor.P|
|00002200| 75 74 52 47 42 43 6f 6c | 6f 72 28 6e 65 77 43 6f |utRGBCol|or(newCo|
|00002210| 6c 6f 72 29 3b 0d 09 09 | 09 09 09 61 70 70 6c 65 |lor);...|...apple|
|00002220| 45 76 65 6e 74 2d 3e 57 | 72 69 74 65 50 61 72 61 |Event->W|ritePara|
|00002230| 6d 65 74 65 72 28 6b 65 | 79 41 45 44 61 74 61 2c |meter(ke|yAEData,|
|00002240| 20 74 68 65 4e 65 77 43 | 6f 6c 6f 72 29 3b 0d 09 | theNewC|olor);..|
|00002250| 09 09 09 09 54 41 70 70 | 6c 65 45 76 65 6e 74 20 |....TApp|leEvent |
|00002260| 2a 20 74 68 65 52 65 70 | 6c 79 20 3d 20 61 70 70 |* theRep|ly = app|
|00002270| 6c 65 45 76 65 6e 74 20 | 2d 3e 20 53 65 6e 64 28 |leEvent |-> Send(|
|00002280| 29 3b 0d 09 09 09 09 09 | 46 72 65 65 49 66 4f 62 |);......|FreeIfOb|
|00002290| 6a 65 63 74 28 61 70 70 | 6c 65 45 76 65 6e 74 29 |ject(app|leEvent)|
|000022a0| 3b 0d 09 09 09 09 09 46 | 72 65 65 49 66 4f 62 6a |;......F|reeIfObj|
|000022b0| 65 63 74 28 74 68 65 52 | 65 70 6c 79 29 3b 09 09 |ect(theR|eply);..|
|000022c0| 09 09 0d 09 09 09 09 7d | 0d 09 09 09 09 65 6c 73 |.......}|.....els|
|000022d0| 65 0d 09 09 09 09 7b 0d | 09 09 09 09 09 54 53 65 |e.....{.|.....TSe|
|000022e0| 74 43 6f 6c 6f 72 43 6f | 6d 6d 61 6e 64 20 2a 61 |tColorCo|mmand *a|
|000022f0| 53 65 74 43 6f 6c 6f 72 | 43 6f 6d 6d 61 6e 64 20 |SetColor|Command |
|00002300| 3d 20 6e 65 77 20 54 53 | 65 74 43 6f 6c 6f 72 43 |= new TS|etColorC|
|00002310| 6f 6d 6d 61 6e 64 28 29 | 3b 0d 09 09 09 09 09 61 |ommand()|;......a|
|00002320| 53 65 74 43 6f 6c 6f 72 | 43 6f 6d 6d 61 6e 64 2d |SetColor|Command-|
|00002330| 3e 49 53 65 74 43 6f 6c | 6f 72 43 6f 6d 6d 61 6e |>ISetCol|orComman|
|00002340| 64 28 74 68 69 73 2c 20 | 6e 65 77 43 6f 6c 6f 72 |d(this, |newColor|
|00002350| 29 3b 0d 09 09 09 09 09 | 50 6f 73 74 43 6f 6d 6d |);......|PostComm|
|00002360| 61 6e 64 28 61 53 65 74 | 43 6f 6c 6f 72 43 6f 6d |and(aSet|ColorCom|
|00002370| 6d 61 6e 64 29 3b 0d 09 | 09 09 09 7d 0d 09 09 09 |mand);..|...}....|
|00002380| 7d 0d 09 09 7d 0d 09 62 | 72 65 61 6b 3b 0d 0d 0d |}...}..b|reak;...|
|00002390| 4f 74 68 65 72 20 49 6e | 73 69 67 68 74 73 3a 0d |Other In|sights:.|
|000023a0| 0d 31 2e 20 54 54 77 69 | 73 74 44 6f 77 6e 43 6f |.1. TTwi|stDownCo|
|000023b0| 6e 74 72 6f 6c 3a 3a 44 | 6f 4d 6f 75 73 65 55 70 |ntrol::D|oMouseUp|
|000023c0| 0d 0d 44 6f 4d 6f 75 73 | 65 55 70 20 69 73 20 73 |..DoMous|eUp is s|
|000023d0| 6f 6d 65 77 68 61 74 20 | 61 6e 61 6c 6f 67 6f 75 |omewhat |analogou|
|000023e0| 73 20 74 6f 20 44 6f 4d | 6f 75 73 65 43 6f 6d 6d |s to DoM|ouseComm|
|000023f0| 61 6e 64 2e 20 54 68 65 | 20 64 69 66 66 65 72 65 |and. The| differe|
|00002400| 6e 63 65 20 69 73 20 74 | 68 61 74 20 44 6f 4d 6f |nce is t|hat DoMo|
|00002410| 75 73 65 43 6f 6d 6d 61 | 6e 64 20 6b 6e 6f 77 73 |useComma|nd knows|
|00002420| 20 69 66 20 74 68 65 20 | 63 6c 69 63 6b 20 77 61 | if the |click wa|
|00002430| 73 20 61 20 66 69 72 73 | 74 20 63 6c 69 63 6b 20 |s a firs|t click |
|00002440| 61 6e 64 20 63 61 6e 20 | 69 67 6e 6f 72 65 20 61 |and can |ignore a|
|00002450| 20 66 69 72 73 74 20 63 | 6c 69 63 6b 2e 20 44 6f | first c|lick. Do|
|00002460| 4d 6f 75 73 65 55 70 20 | 64 6f 65 73 6e d5 74 20 |MouseUp |doesn.t |
|00002470| 6b 6e 6f 77 20 61 6e 79 | 74 68 69 6e 67 20 61 62 |know any|thing ab|
|00002480| 6f 75 74 20 63 6c 69 63 | 6b 73 2e 20 49 6e 20 74 |out clic|ks. In t|
|00002490| 68 65 20 63 61 73 65 20 | 6f 66 20 54 77 69 73 74 |he case |of Twist|
|000024a0| 20 44 6f 77 6e 20 4c 69 | 73 74 73 2c 20 61 20 6d | Down Li|sts, a m|
|000024b0| 6f 75 73 65 44 6f 77 6e | 20 66 6f 6c 6c 6f 77 65 |ouseDown| followe|
|000024c0| 64 20 62 79 20 61 20 6d | 6f 75 73 65 55 70 20 69 |d by a m|ouseUp i|
|000024d0| 6e 20 61 20 74 77 69 73 | 74 44 6f 77 6e 43 6f 6e |n a twis|tDownCon|
|000024e0| 74 72 6f 6c 20 69 6e 20 | 61 20 62 65 68 69 6e 64 |trol in |a behind|
|000024f0| 20 77 69 6e 64 6f 77 20 | 72 65 73 75 6c 74 73 20 | window |results |
|00002500| 69 6e 20 74 68 65 20 77 | 69 6e 64 6f 77 20 62 65 |in the w|indow be|
|00002510| 69 6e 67 20 62 72 6f 75 | 67 68 74 20 74 6f 20 74 |ing brou|ght to t|
|00002520| 68 65 20 66 72 6f 6e 74 | 20 61 6e 64 20 74 68 65 |he front| and the|
|00002530| 20 74 77 69 73 74 44 6f | 77 6e 43 6f 6e 74 72 6f | twistDo|wnContro|
|00002540| 6c 20 62 65 69 6e 67 20 | 65 78 70 61 6e 64 65 64 |l being |expanded|
|00002550| 20 6f 72 20 63 6f 6c 6c | 61 70 73 65 64 20 61 73 | or coll|apsed as|
|00002560| 20 74 68 65 20 63 61 73 | 65 20 6d 61 79 20 62 65 | the cas|e may be|
|00002570| 2e 20 54 68 61 74 d5 73 | 20 61 20 6c 69 74 74 6c |. That.s| a littl|
|00002580| 65 20 64 69 73 63 6f 6e | 63 65 72 74 69 6e 67 2e |e discon|certing.|
|00002590| 0d 0d 49 6e 20 54 77 69 | 73 74 20 44 6f 77 6e 20 |..In Twi|st Down |
|000025a0| 4c 69 73 74 73 2c 20 54 | 56 69 65 77 3a 3a 48 61 |Lists, T|View::Ha|
|000025b0| 6e 64 6c 65 4d 6f 75 73 | 65 44 6f 77 6e 20 69 73 |ndleMous|eDown is|
|000025c0| 20 6f 76 65 72 72 69 64 | 64 65 6e 20 69 6e 20 6f | overrid|den in o|
|000025d0| 72 64 65 72 20 74 6f 20 | 63 61 70 74 75 72 65 20 |rder to |capture |
|000025e0| 66 69 72 73 74 20 63 6c | 69 63 6b 20 69 6e 66 6f |first cl|ick info|
|000025f0| 72 6d 61 74 69 6f 6e 20 | 61 73 20 66 6f 6c 6c 6f |rmation |as follo|
|00002600| 77 73 3a 0d 0d 66 49 73 | 46 69 72 73 74 43 6c 69 |ws:..fIs|FirstCli|
|00002610| 63 6b 20 3d 20 28 6d 6f | 75 73 65 44 6f 77 6e 54 |ck = (mo|useDownT|
|00002620| 79 70 65 20 3d 3d 20 6b | 46 69 72 73 74 43 6c 69 |ype == k|FirstCli|
|00002630| 63 6b 5f 64 72 61 67 4f | 6e 6c 79 20 7c 7c 20 6d |ck_dragO|nly || m|
|00002640| 6f 75 73 65 44 6f 77 6e | 54 79 70 65 20 3d 3d 20 |ouseDown|Type == |
|00002650| 6b 46 69 72 73 74 43 6c | 69 63 6b 5f 64 72 61 67 |kFirstCl|ick_drag|
|00002660| 4f 72 43 6c 69 63 6b 29 | 3b 0d 0d 77 68 69 63 68 |OrClick)|;..which|
|00002670| 20 69 73 20 73 61 76 65 | 64 20 69 6e 20 74 68 65 | is save|d in the|
|00002680| 20 54 54 77 69 73 74 44 | 6f 77 6e 56 69 65 77 20 | TTwistD|ownView |
|00002690| 66 69 65 6c 64 20 66 49 | 73 46 69 72 73 74 43 6c |field fI|sFirstCl|
|000026a0| 69 63 6b 20 66 6f 72 20 | 75 73 65 20 62 79 20 54 |ick for |use by T|
|000026b0| 54 77 69 73 74 44 6f 77 | 6e 43 6f 6e 74 72 6f 6c |TwistDow|nControl|
|000026c0| 3a 3a 44 6f 4d 6f 75 73 | 65 55 70 20 77 68 65 72 |::DoMous|eUp wher|
|000026d0| 65 20 69 74 20 69 73 20 | 74 65 73 74 65 64 20 77 |e it is |tested w|
|000026e0| 69 74 68 3a 0d 0d 69 66 | 20 28 66 54 77 69 73 74 |ith:..if| (fTwist|
|000026f0| 44 6f 77 6e 56 69 65 77 | 20 2d 3e 20 66 49 73 46 |DownView| -> fIsF|
|00002700| 69 72 73 74 43 6c 69 63 | 6b 20 3d 3d 20 46 41 4c |irstClic|k == FAL|
|00002710| 53 45 29 0d 09 7b 0d 09 | 09 44 6f 20 74 68 69 73 |SE)..{..|.Do this|
|00002720| 20 73 74 75 66 66 20 69 | 66 20 69 74 20 69 73 6e | stuff i|f it isn|
|00002730| d5 74 20 61 20 66 69 72 | 73 74 20 63 6c 69 63 6b |.t a fir|st click|
|00002740| 2e 09 0d 09 7d 0d 0d 45 | 73 73 65 6e 74 69 61 6c |....}..E|ssential|
|00002750| 6c 79 2c 20 74 68 65 20 | 6d 6f 75 73 65 55 70 20 |ly, the |mouseUp |
|00002760| 65 76 65 6e 74 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |event fo|llowing |
|00002770| 61 20 66 69 72 73 74 20 | 63 6c 69 63 6b 20 6d 6f |a first |click mo|
|00002780| 75 73 65 44 6f 77 6e 20 | 65 76 65 6e 74 20 69 73 |useDown |event is|
|00002790| 20 73 77 61 6c 6c 6f 77 | 65 64 2e 0d 0d 0d 48 49 | swallow|ed....HI|
|000027a0| 20 49 73 73 75 65 73 3a | 0d 0d 31 2e 20 50 72 6f | Issues:|..1. Pro|
|000027b0| 67 72 65 73 73 20 49 6e | 64 69 63 61 74 6f 72 20 |gress In|dicator |
|000027c0| 61 6e 64 20 53 63 72 69 | 70 74 69 6e 67 0d 0d 57 |and Scri|pting..W|
|000027d0| 68 65 6e 20 54 77 69 73 | 74 20 44 6f 77 6e 20 4c |hen Twis|t Down L|
|000027e0| 69 73 74 73 20 69 73 20 | 64 72 69 76 65 6e 20 62 |ists is |driven b|
|000027f0| 79 20 61 20 73 63 72 69 | 70 74 20 74 68 61 74 20 |y a scri|pt that |
|00002800| 69 73 20 6f 70 65 6e 69 | 6e 67 20 64 69 73 6b 73 |is openi|ng disks|
|00002810| 2c 20 74 68 65 20 70 72 | 6f 67 72 65 73 73 20 69 |, the pr|ogress i|
|00002820| 6e 64 69 63 61 74 6f 72 | 20 69 73 20 70 75 74 20 |ndicator| is put |
|00002830| 75 70 2e 20 49 20 61 6d | 20 61 6d 62 69 76 61 6c |up. I am| ambival|
|00002840| 65 6e 74 20 61 73 20 74 | 6f 20 77 68 65 74 68 65 |ent as t|o whethe|
|00002850| 72 20 74 68 61 74 20 69 | 73 20 74 68 65 20 72 69 |r that i|s the ri|
|00002860| 67 68 74 20 74 68 69 6e | 67 20 74 6f 20 64 6f 2e |ght thin|g to do.|
|00002870| 20 54 68 61 74 20 69 73 | 20 70 61 72 74 69 63 75 | That is| particu|
|00002880| 6c 61 72 6c 79 20 73 6f | 20 69 6e 20 76 69 65 77 |larly so| in view|
|00002890| 20 6f 66 20 74 68 65 20 | 66 61 63 74 20 74 68 61 | of the |fact tha|
|000028a0| 74 20 74 68 65 20 73 74 | 6f 70 20 62 75 74 74 74 |t the st|op buttt|
|000028b0| 6f 6e 20 69 73 20 61 63 | 74 69 76 65 20 61 6e 64 |on is ac|tive and|
|000028c0| 20 69 66 20 74 68 65 20 | 75 73 65 72 20 77 65 72 | if the |user wer|
|000028d0| 65 20 74 6f 20 63 6c 69 | 63 6b 20 6f 6e 20 69 74 |e to cli|ck on it|
|000028e0| 2c 20 54 77 69 73 74 20 | 44 6f 77 6e 20 4c 69 73 |, Twist |Down Lis|
|000028f0| 74 73 20 77 6f 75 6c 64 | 20 73 74 6f 70 20 72 65 |ts would| stop re|
|00002900| 61 64 69 6e 67 20 74 68 | 65 20 76 6f 6c 75 6d 65 |ading th|e volume|
|00002910| 20 61 6e 64 20 63 6f 6e | 74 69 6e 75 65 20 6f 6e | and con|tinue on|
|00002920| 20 77 69 74 68 20 74 68 | 65 20 6e 65 78 74 20 73 | with th|e next s|
|00002930| 63 72 69 70 74 20 63 6f | 6d 6d 61 6e 64 2e 20 41 |cript co|mmand. A|
|00002940| 74 20 6c 65 61 73 74 20 | 64 75 72 69 6e 67 20 74 |t least |during t|
|00002950| 68 65 20 64 65 62 75 67 | 67 69 6e 67 20 70 72 6f |he debug|ging pro|
|00002960| 63 65 73 73 20 69 74 20 | 69 73 20 6e 69 63 65 20 |cess it |is nice |
|00002970| 74 6f 20 68 61 76 65 20 | 69 74 20 62 75 74 2c 20 |to have |it but, |
|00002980| 66 6f 72 20 61 20 73 68 | 69 70 70 69 6e 67 20 61 |for a sh|ipping a|
|00002990| 70 70 6c 69 63 61 74 69 | 6f 6e 20 49 20 64 6f 6e |pplicati|on I don|
|000029a0| d5 74 20 6b 6e 6f 77 2e | 0d 0d 0d 32 2e 20 63 57 |.t know.|...2. cW|
|000029b0| 72 69 74 69 6e 67 44 69 | 72 65 63 74 69 6f 6e 20 |ritingDi|rection |
|000029c0| 43 6f 6d 6d 61 6e 64 0d | 0d 4f 72 69 67 69 6e 61 |Command.|.Origina|
|000029d0| 6c 6c 79 2c 20 74 68 65 | 72 65 20 77 65 72 65 20 |lly, the|re were |
|000029e0| 74 77 6f 20 63 68 65 63 | 6b 65 64 20 6d 65 6e 75 |two chec|ked menu|
|000029f0| 20 69 74 65 6d 73 2c 20 | 63 52 69 67 68 74 54 6f | items, |cRightTo|
|00002a00| 4c 65 66 74 20 61 6e 64 | 20 63 4c 65 66 74 54 6f |Left and| cLeftTo|
|00002a10| 52 69 67 68 74 2e 20 57 | 68 69 63 68 65 76 65 72 |Right. W|hichever|
|00002a20| 20 77 61 73 20 63 75 72 | 72 65 6e 74 6c 79 20 62 | was cur|rently b|
|00002a30| 65 69 6e 67 20 75 73 65 | 64 20 77 61 73 20 63 68 |eing use|d was ch|
|00002a40| 65 63 6b 65 64 2e 20 57 | 68 65 6e 20 74 68 65 20 |ecked. W|hen the |
|00002a50| 6f 74 68 65 72 20 77 61 | 73 20 73 65 6c 65 63 74 |other wa|s select|
|00002a60| 65 64 2c 20 69 74 20 77 | 61 73 20 63 68 65 63 6b |ed, it w|as check|
|00002a70| 65 64 20 61 6e 64 20 74 | 68 65 20 6f 74 68 65 72 |ed and t|he other|
|00002a80| 20 6f 6e 65 20 77 61 73 | 20 6e 6f 74 20 63 68 65 | one was| not che|
|00002a90| 63 6b 65 64 2e 20 49 6e | 20 6f 74 68 65 72 20 77 |cked. In| other w|
|00002aa0| 6f 72 64 73 2c 20 74 68 | 65 20 61 70 70 6c 69 63 |ords, th|e applic|
|00002ab0| 61 74 69 6f 6e 20 74 6f | 67 67 6c 65 64 20 62 65 |ation to|ggled be|
|00002ac0| 74 77 65 65 6e 20 74 77 | 6f 20 64 69 73 74 69 6e |tween tw|o distin|
|00002ad0| 63 74 20 6d 65 6e 75 20 | 69 74 65 6d 73 2e 20 0d |ct menu |items. .|
|00002ae0| 0d 54 68 65 6e 20 49 20 | 64 65 63 69 64 65 64 20 |.Then I |decided |
|00002af0| 74 6f 20 75 73 65 20 61 | 20 73 69 6e 67 6c 65 20 |to use a| single |
|00002b00| 63 6f 6d 6d 61 6e 64 20 | 61 6e 64 20 63 68 61 6e |command |and chan|
|00002b10| 67 65 20 74 68 65 20 63 | 6f 6d 6d 61 6e 64 20 6e |ge the c|ommand n|
|00002b20| 61 6d 65 20 61 70 70 65 | 61 72 69 6e 67 20 69 6e |ame appe|aring in|
|00002b30| 20 74 68 65 20 6d 65 6e | 75 20 64 65 70 65 6e 64 | the men|u depend|
|00002b40| 69 6e 67 20 6f 6e 20 74 | 68 65 20 63 75 72 72 65 |ing on t|he curre|
|00002b50| 6e 74 20 73 69 74 75 61 | 74 69 6f 6e 2e 20 54 68 |nt situa|tion. Th|
|00002b60| 61 74 20 69 73 2c 20 69 | 66 20 74 68 65 20 63 75 |at is, i|f the cu|
|00002b70| 72 72 65 6e 74 20 77 72 | 69 74 69 6e 67 20 64 69 |rrent wr|iting di|
|00002b80| 72 65 63 74 69 6f 6e 20 | 77 61 73 20 6c 65 66 74 |rection |was left|
|00002b90| 2d 74 6f 2d 72 69 67 68 | 74 2c 20 74 68 65 20 6d |-to-righ|t, the m|
|00002ba0| 65 6e 75 20 77 6f 75 6c | 64 20 73 68 6f 77 20 52 |enu woul|d show R|
|00002bb0| 69 67 68 74 2d 54 6f 2d | 4c 65 66 74 20 61 6e 64 |ight-To-|Left and|
|00002bc0| 20 69 66 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 | if the |current |
|00002bd0| 77 72 69 74 69 6e 67 20 | 64 69 72 65 63 74 69 6f |writing |directio|
|00002be0| 6e 20 77 61 73 20 72 69 | 67 68 74 2d 74 6f 2d 6c |n was ri|ght-to-l|
|00002bf0| 65 66 74 2c 20 74 68 65 | 20 6d 65 6e 75 20 69 74 |eft, the| menu it|
|00002c00| 65 6d 20 77 6f 75 6c 64 | 20 73 68 6f 77 20 4c 65 |em would| show Le|
|00002c10| 66 74 2d 54 6f 2d 52 69 | 67 68 74 2e 0d 0d 48 61 |ft-To-Ri|ght...Ha|
|00002c20| 76 69 6e 67 20 75 73 65 | 64 20 69 74 20 66 6f 72 |ving use|d it for|
|00002c30| 20 61 20 77 68 69 6c 65 | 2c 20 49 20 6e 6f 20 6c | a while|, I no l|
|00002c40| 6f 6e 67 65 72 20 6c 69 | 6b 65 20 69 74 2e 20 49 |onger li|ke it. I|
|00002c50| 20 68 61 76 65 20 74 6f | 20 74 68 69 6e 6b 20 74 | have to| think t|
|00002c60| 6f 6f 20 68 61 72 64 20 | 74 6f 20 64 65 64 75 63 |oo hard |to deduc|
|00002c70| 65 20 77 68 61 74 d5 73 | 20 72 65 61 6c 6c 79 20 |e what.s| really |
|00002c80| 67 6f 69 6e 67 20 6f 6e | 2e 20 49 20 74 68 69 6e |going on|. I thin|
|00002c90| 6b 20 74 68 65 20 6f 6c | 64 20 77 61 79 2c 20 77 |k the ol|d way, w|
|00002ca0| 69 74 68 20 74 77 6f 20 | 6d 65 6e 75 20 69 74 65 |ith two |menu ite|
|00002cb0| 6d 73 2c 20 77 61 73 20 | 62 65 74 74 65 72 2e 20 |ms, was |better. |
|00002cc0| 0d 0d 55 6e 66 6f 72 74 | 75 6e 61 74 65 6c 79 2c |..Unfort|unately,|
|00002cd0| 20 69 74 20 69 73 20 74 | 6f 6f 20 6c 61 74 65 20 | it is t|oo late |
|00002ce0| 74 6f 20 63 68 61 6e 67 | 65 20 69 74 20 62 61 63 |to chang|e it bac|
|00002cf0| 6b 2e 0d 0d 0d 33 2e 20 | 57 69 6e 64 6f 77 20 7a |k....3. |Window z|
|00002d00| 6f 6f 6d 20 61 6e 64 20 | 72 65 73 69 7a 65 0d 0d |oom and |resize..|
|00002d10| 57 68 65 6e 20 74 68 65 | 20 77 72 69 74 69 6e 67 |When the| writing|
|00002d20| 20 64 69 72 65 63 74 69 | 6f 6e 20 69 73 20 72 69 | directi|on is ri|
|00002d30| 67 68 74 2d 74 6f 2d 6c | 65 66 74 2c 20 74 68 65 |ght-to-l|eft, the|
|00002d40| 20 74 77 69 73 74 44 77 | 6f 6e 43 6f 6e 74 72 6f | twistDw|onContro|
|00002d50| 6c 73 20 61 6e 64 20 74 | 68 65 20 74 65 78 74 20 |ls and t|he text |
|00002d60| 73 68 6f 75 6c 64 20 72 | 65 6d 61 69 6e 20 70 69 |should r|emain pi|
|00002d70| 6e 6e 65 64 20 74 6f 20 | 74 68 65 20 72 69 67 68 |nned to |the righ|
|00002d80| 74 20 73 69 64 65 20 6f | 66 20 74 68 65 20 77 69 |t side o|f the wi|
|00002d90| 6e 64 6f 77 2e 20 54 68 | 65 72 65 20 61 72 65 20 |ndow. Th|ere are |
|00002da0| 74 77 6f 20 73 69 74 75 | 61 74 69 6f 6e 73 20 77 |two situ|ations w|
|00002db0| 68 65 72 65 20 74 68 69 | 73 20 64 6f 65 73 20 6e |here thi|s does n|
|00002dc0| 6f 74 20 68 61 70 70 65 | 6e 2e 20 4f 6e 65 20 69 |ot happe|n. One i|
|00002dd0| 73 20 74 68 65 20 63 61 | 73 65 20 69 6e 5a 6f 6f |s the ca|se inZoo|
|00002de0| 6d 49 6e 20 69 6e 20 54 | 57 69 6e 64 6f 77 3a 3a |mIn in T|Window::|
|00002df0| 5a 6f 6f 6d 42 79 55 73 | 65 72 2e 20 49 66 20 74 |ZoomByUs|er. If t|
|00002e00| 68 65 20 75 73 65 72 20 | 7a 6f 6f 6d 73 20 6f 75 |he user |zooms ou|
|00002e10| 74 2c 20 65 76 65 72 79 | 74 68 69 6e 67 20 77 6f |t, every|thing wo|
|00002e20| 72 6b 73 2e 20 48 6f 77 | 65 76 65 72 2c 20 77 68 |rks. How|ever, wh|
|00002e30| 65 6e 20 74 68 65 20 75 | 73 65 72 20 7a 6f 6f 6d |en the u|ser zoom|
|00002e40| 73 20 69 6e 2c 20 74 68 | 65 20 76 69 65 77 20 73 |s in, th|e view s|
|00002e50| 63 72 6f 6c 6c 73 20 72 | 6f 75 67 68 6c 79 20 74 |crolls r|oughly t|
|00002e60| 6f 20 74 68 65 20 68 6f | 72 69 7a 6f 6e 74 61 6c |o the ho|rizontal|
|00002e70| 20 6d 69 64 70 6f 69 6e | 74 20 6f 66 20 74 68 65 | midpoin|t of the|
|00002e80| 20 76 69 65 77 2e 20 55 | 73 75 61 6c 6c 79 2c 20 | view. U|sually, |
|00002e90| 74 68 65 72 65 20 69 73 | 20 6e 6f 74 68 69 6e 67 |there is| nothing|
|00002ea0| 20 74 6f 20 73 65 65 20 | 74 68 65 72 65 20 61 6e | to see |there an|
|00002eb0| 64 20 74 68 65 20 73 63 | 72 6f 6c 6c 20 62 61 72 |d the sc|roll bar|
|00002ec0| 73 20 6d 75 73 74 20 62 | 65 20 75 73 65 64 20 74 |s must b|e used t|
|00002ed0| 6f 20 74 6f 20 66 69 6e | 64 20 61 6e 79 74 68 69 |o to fin|d anythi|
|00002ee0| 6e 67 20 69 6e 20 74 68 | 65 20 77 69 6e 64 6f 77 |ng in th|e window|
|00002ef0| 2e 0d 0d 54 68 65 20 6f | 74 68 65 72 20 69 73 20 |...The o|ther is |
|00002f00| 69 6e 20 54 57 69 6e 64 | 6f 77 3a 3a 52 65 73 69 |in TWind|ow::Resi|
|00002f10| 7a 65 42 79 55 73 65 72 | 2e 20 49 66 20 74 68 65 |zeByUser|. If the|
|00002f20| 20 75 73 65 72 20 72 65 | 73 69 7a 65 73 20 74 68 | user re|sizes th|
|00002f30| 65 20 77 69 6e 64 6f 77 | 20 61 6e 64 20 6d 61 6b |e window| and mak|
|00002f40| 65 73 20 69 74 20 6c 61 | 72 67 65 72 2c 20 65 76 |es it la|rger, ev|
|00002f50| 65 72 79 74 68 69 6e 67 | 20 72 65 6d 61 69 6e 73 |erything| remains|
|00002f60| 20 70 69 6e 6e 65 64 20 | 74 6f 20 74 68 65 20 72 | pinned |to the r|
|00002f70| 69 67 68 74 20 73 69 64 | 65 20 6f 66 20 74 68 65 |ight sid|e of the|
|00002f80| 20 77 69 6e 64 6f 77 20 | 61 73 20 69 74 20 73 68 | window |as it sh|
|00002f90| 6f 75 6c 64 2e 20 42 75 | 74 2c 20 77 68 65 6e 20 |ould. Bu|t, when |
|00002fa0| 74 68 65 20 75 73 65 72 | 20 72 65 73 69 7a 65 73 |the user| resizes|
|00002fb0| 20 74 68 65 20 77 69 6e | 64 6f 77 20 61 6e 64 20 | the win|dow and |
|00002fc0| 6d 61 6b 65 73 20 69 74 | 20 73 6d 61 6c 6c 65 72 |makes it| smaller|
|00002fd0| 2c 20 74 68 65 20 74 68 | 65 20 73 74 75 66 66 20 |, the th|e stuff |
|00002fe0| 64 6f 65 73 6e d5 74 20 | 72 65 6d 61 69 6e 20 70 |doesn.t |remain p|
|00002ff0| 69 6e 6e 65 64 20 74 6f | 20 74 68 65 20 72 69 67 |inned to| the rig|
|00003000| 68 74 20 73 69 64 65 20 | 6f 66 20 74 68 65 20 77 |ht side |of the w|
|00003010| 69 6e 64 6f 77 2e 0d 0d | 4e 65 69 74 68 65 72 20 |indow...|Neither |
|00003020| 6f 66 20 74 68 65 73 65 | 20 70 72 6f 62 6c 65 6d |of these| problem|
|00003030| 73 20 61 72 65 20 66 61 | 74 61 6c 2c 20 62 75 74 |s are fa|tal, but|
|00003040| 20 74 68 65 79 20 73 75 | 72 65 20 61 72 65 6e d5 | they su|re aren.|
|00003050| 74 20 67 6f 6f 64 20 68 | 75 6d 61 6e 20 69 6e 74 |t good h|uman int|
|00003060| 65 72 66 61 63 65 20 64 | 65 73 69 67 6e 2e 0d 41 |erface d|esign..A|
|00003070| 74 20 74 68 69 73 20 70 | 6f 69 6e 74 2c 20 64 65 |t this p|oint, de|
|00003080| 61 64 6c 69 6e 65 73 20 | 70 72 65 76 65 6e 74 20 |adlines |prevent |
|00003090| 6d 65 20 66 72 6f 6d 20 | 67 65 74 74 69 6e 67 20 |me from |getting |
|000030a0| 74 68 65 6d 20 66 69 78 | 65 64 2c 20 73 6f 20 77 |them fix|ed, so w|
|000030b0| 65 20 73 68 69 70 2e 0d | 0d 54 68 65 79 d5 72 65 |e ship..|.They.re|
|000030c0| 20 67 6f 69 6e 67 20 74 | 6f 20 62 65 20 69 6e 74 | going t|o be int|
|000030d0| 65 72 65 73 74 69 6e 67 | 20 70 72 6f 62 6c 65 6d |eresting| problem|
|000030e0| 73 20 74 6f 20 66 69 78 | 2e 20 4d 61 63 41 70 70 |s to fix|. MacApp|
|000030f0| 20 73 65 65 6d 73 20 74 | 6f 20 62 65 20 74 6f 70 | seems t|o be top|
|00003100| 4c 65 66 74 2d 63 65 6e | 74 72 69 63 20 61 6e 64 |Left-cen|tric and|
|00003110| 20 72 65 61 6c 6c 79 20 | 64 6f 65 73 6e d5 74 20 | really |doesn.t |
|00003120| 77 61 6e 74 20 74 6f 20 | 68 61 76 65 20 61 6e 79 |want to |have any|
|00003130| 74 68 69 6e 67 20 74 6f | 20 64 6f 20 77 69 74 68 |thing to| do with|
|00003140| 20 74 6f 70 52 69 67 68 | 74 2e 20 52 65 73 69 7a | topRigh|t. Resiz|
|00003150| 65 42 79 55 73 65 72 20 | 77 69 6c 6c 20 62 65 20 |eByUser |will be |
|00003160| 61 20 6c 69 74 74 6c 65 | 20 74 72 69 63 6b 79 20 |a little| tricky |
|00003170| 74 6f 20 68 61 6e 64 6c | 65 20 62 65 63 61 75 73 |to handl|e becaus|
|00003180| 65 20 66 72 6f 6d 20 6d | 79 20 70 72 65 6c 69 6d |e from m|y prelim|
|00003190| 69 6e 61 72 79 20 69 6e | 76 65 73 74 69 67 61 74 |inary in|vestigat|
|000031a0| 69 6f 6e 2c 20 73 75 62 | 76 69 65 77 73 20 6f 66 |ion, sub|views of|
|000031b0| 20 54 57 69 6e 64 6f 77 | 20 64 6f 6e d5 74 20 61 | TWindow| don.t a|
|000031c0| 70 70 65 61 72 20 74 6f | 20 62 65 20 74 6f 6c 64 |ppear to| be told|
|000031d0| 20 74 68 61 74 20 74 68 | 65 20 77 69 6e 64 6f 77 | that th|e window|
|000031e0| 20 77 61 73 20 72 65 73 | 69 7a 65 64 2e 20 49 74 | was res|ized. It|
|000031f0| 20 6d 61 79 20 62 65 20 | 6e 65 63 65 73 73 61 72 | may be |necessar|
|00003200| 79 20 74 6f 20 73 75 62 | 63 6c 61 73 73 20 54 57 |y to sub|class TW|
|00003210| 69 6e 64 6f 77 2e 0d 0d | 4c 6f 6f 6b 73 20 6c 69 |indow...|Looks li|
|00003220| 6b 65 20 61 6e 20 6f 70 | 70 6f 72 74 75 6e 69 74 |ke an op|portunit|
|00003230| 79 20 74 6f 20 6d 65 2e | 0d 0d 37 2f 31 35 2f 39 |y to me.|..7/15/9|
|00003240| 36 0d 0d 0d 0d 0d 0d 0d | 0d 0d 0d 00 00 00 00 00 |6.......|........|
|00003250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003260| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003270| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003280| 00 00 01 00 00 00 01 1a | 00 00 00 1a 00 00 00 32 |........|.......2|
|00003290| 42 4f 42 4f 41 50 50 4c | 01 00 00 00 00 00 00 00 |BOBOAPPL|........|
|000032a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032b0| 07 21 52 65 61 64 4d 65 | 02 00 00 00 54 45 58 54 |.!ReadMe|....TEXT|
|000032c0| 74 74 78 74 01 00 00 00 | 00 80 00 00 00 00 5c 7f |ttxt....|......\.|
|000032d0| 00 00 54 45 58 54 74 74 | 78 74 01 00 00 00 00 80 |..TEXTtt|xt......|
|000032e0| 00 00 00 00 00 00 00 00 | 00 00 80 00 00 00 00 00 |........|........|
|000032f0| 00 00 ae 62 ef aa 00 00 | 31 cb 00 00 01 4c 00 00 |...b....|1....L..|
|00003300| 00 00 00 00 00 00 00 00 | 00 00 01 ac 25 01 43 47 |........|....%.CG|
|00003310| 56 4d 41 50 50 4c 01 00 | 00 00 00 00 00 00 00 00 |VMAPPL..|........|
|00003320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003330| 00 00 00 00 00 99 25 01 | 43 57 49 45 69 4f 42 4a |......%.|CWIEiOBJ|
|00003340| fd 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 02 ea |........|........|
|00003360| 25 01 44 44 41 50 44 44 | 41 32 02 00 00 00 00 00 |%.DDAPDD|A2......|
|00003370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003380| 00 00 00 16 00 01 00 00 | 00 00 00 10 00 0c 00 03 |........|........|
|00003390| 00 00 00 0c 00 00 00 00 | 00 00 00 00 01 00 00 00 |........|........|
|000033a0| 01 1a 00 00 00 1a 00 00 | 00 32 03 4f ef 28 23 a0 |........|.2.O.(#.|
|000033b0| 00 00 00 1c 00 32 00 00 | 73 74 79 6c 00 00 00 0a |.....2..|styl....|
|000033c0| 00 80 ff ff 00 00 00 00 | 03 4f f0 d0 00 00 00 00 |........|.O......|
|000033d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+